Re: [jQuery] New Forums
I was able to use my Google account to logon and didn't have to supply any info. I also haven't received any emails. When I click the Login button, below the Username and Password fields are other options for logging in, either a Google account or a Yahoo! account. It also looks like a Google Apps account. Hope this helps, Joe Moore On Thu, Jan 21, 2010 at 7:28 PM, Shawn sgro...@open2space.com wrote: My apologies to the list managers. I did not mean to belittle their efforts in any way. I only meant to state that for me, personally, forums are not the preferred tool. I am involved in a number of organizations where the main mantra is the concept of a do-aucracy. If you think it should be done a particular way, do it. For this list, this means that the list managers have DONE it, and so they get to make the rules. I don't pretend to know all the considerations that went into the choices that were made. But, I find it unacceptable that I have to give my contact information to zoho.com so that I can use a forum on jquery.com. (as suggested by Andre in a different posting on this thread). For some reason it is deemed ok for our account info (and everything related to it) to be accessible by absolute anyone. Whether it is a FaceBook account, a GMail account, etc. I have put the brakes on for this trend and refuse to give my information away to third party sites that have nothing to do with what I'm trying to do. No offense intended to the zoho gang, as I do not know them or their intentions/purposes. But I'll just say no. My thoughts. Shawn Shawn wrote: I received this email as well. I don't know if it is legitimate or not tough. Nor do I care. Web based forums DO NOT WORK for my needs. I cannot do a quick scan of topics in a forum without first opening a browser and going to that forum. Whereas with an email list, I scan my email frequently during the day as part of my usual routine. So, if the mailing list is to disappear, I for one will not spend t much effort trying to replace it with a web forum. I can always use the IRC channel when I need assistance. To be fair though, I can see why there would be a desire to shift away from Google Groups. I will likely take a look at the forum to see what's what, but doubt it fill my needs. Still, there are other alternatives than a web forum (i.e. mailman). My thoughts. Shawn Matt Quackenbush wrote: Hello, I received an email inviting me to join the new jQuery forums. It contained a username and password for me to use. However, when I try to login, I am told that my email address has not been confirmed and therefore cannot do so. A link to a help page is given whereby I can allegedly have a confirmation email sent by following a list of instructions. Interestingly enough, the very first step given in the instructions is to login. I thought that perhaps I would be able to do so at the link given, but alas an attempt to login there results in the exact same message and help link being presented. Any suggestions on how to actually login/activate would be appreciated. :-)
Re: [jQuery] jQuery Version
There's no way for us to determine whether updating the jQuery library will affect your site. Too many variables. - Review the Release notes for the version to see if there are any known issues. - Review any plugins that you have to determine if they will work. - Update the library and test your site. Good luck! Joe On Wed, Jan 6, 2010 at 10:04 AM, Cyberdog daviddmiddle...@btinternet.comwrote: Hi, I have a website which has jQuery JavaScript Library v1.3.2 installed. Should i update this to the latest, or would this cause problems to the site. Thanks Dave.
Re: [jQuery] Simple XML Parsing Question
Instead of find, use children? On Nov 17, 2009 2:56 PM, Joe joecel...@gmail.com wrote: I have been banging my head against the wall and searching for answers for the past week, so any help or direction would be appreciated. I am sure that I am missing something obvious. I have some XML that looks like this: ?xml version=1.0 encoding=UTF-8? customMessageList CustomMessage id181/id nameFirst Message/name customMessageImage id135/id nameSample_img.png/name contentTypeimage/png/contentType modifiedOn2009-08-25 11:25:28.34/modifiedOn /customMessageImage /CustomMessage /customMessageList And an AJAX call that looks like this: $.ajax({ type: GET, url: myURL, success: function(xml) { $(xml).find('CustomMessage').each(function(){ var id_text = (this).find('id').text(); var name_text = $(this).find('name').text(); var contentType_text = $(this).find('contentType').text(); }); //close each( } } }); When i run this code, the id and name variables have all the id/name nodes in them. I only want the id/name for the child node. the contentType variable works find (but there is only one instance. Any ideas on how to fix this? I am at my wits end. thx, Joe C
Re: [jQuery] Re: button value change
David, You are correct, that wont work for the input element. Sorry about that. I guess I got focused on the first part of your email and the a element. I'm wondering if you thought about why the code I provided didn't work? You might want to review the jQuery documentation and the tutorials: - http://docs.jquery.com/Main_Page - http://docs.jquery.com/Tutorials Here's why, because the text attribute doesn't exist for your input tag, it doesn't have a text attribute (ok as enhanced by jQuery). When the input element is created like this, then you'd have to change the value attribute. This would then change the text that is displayed to the user. (Note this also changes the value you'd receive on the server end.) If you had used the button element, then changing the text attribute would have worked. Here is some more modified code for you to play. html head titleTest Page/title script src='jquery.js' type='text/javascript'/script script type=text/javascript $(function() { $('#frm1').submit( function(event) { event.preventDefault(); event.stopPropagation(); }); $('#btn1').toggle( function(event) { $(this).attr('value','Hide Details'); }, function(event) { $(this).attr('value','More Details'); } ); $('#btn2').toggle( function(event) { $(this).text('Hide Details'); }, function(event) { $(this).text('More Details'); } ); }); /script /head body form id='frm1' method='post' action='' input id='btn1' type='button' value='More Details' / button id='btn2' type='button'More Details/button /form /body /html HTH, Joe On Thu, Nov 12, 2009 at 9:30 AM, David pr davidpric...@gmail.com wrote: Thanks but this won't work for a input type=button .../ ? David
Re: [jQuery] Re: button value change
Certainly more concise! On Thu, Nov 12, 2009 at 10:00 AM, saxan rappai saxanrap...@gmail.comwrote: iam not sure with this .. but its working... a lil modification.. html head titleTest Page/title script src='jquery.js' type='text/javascript'/script script type=text/javascript $(function() { $('#but').toggle( function(event) { $(this).val('Hide Details'); }, function(event) { $(this).val( 'More Details'); } ); }); /script /head body input type=button id='but' value=More Details / /body /html thanks saxan Rappai On Thu, Nov 12, 2009 at 8:00 PM, David pr davidpric...@gmail.com wrote: Thanks but this won't work for a input type=button .../ ? David -- Thanks regards Saxan Rappai. http://www.primemoveindia.com/in_IT_4.html
Re: [jQuery] Re: Error '$this' is undefined
So the jquery code executes when they click on the link? If so, do you have a click event attached to the links and this code is on it? On Nov 10, 2009 10:46 PM, Daybreak0 daybre...@gmail.com wrote: Joe Here is the Html fom above - I should have continued it into the conversations. HTML Code: div class=cart-summaryspan id=catCartSummary quote=False vertical=Falsetable cellspacin... The CSS class of the link a class=cartSummaryLink href=/ OrderRetrievev2.aspx?CatalogueID=45965View Cart/a is '.cartSummaryLink' The Jquery code is of course $('.cartSummaryLink').val( $(this).val().replace('Cart','My Shopping Bag') $(this) is meant to be equal to 'View Cart' Thanks On Nov 11, 2:05 pm, Joe Moore joe.lynn.mo...@gmail.com wrote: Well, what are you expecting $(t... On Nov 10, 2009 8:42 PM, Daybreak0 daybre...@gmail.com wrote: Joe and Marcel - I see. ...
Re: [jQuery] Re: Error '$this' is undefined
You can't use the val() attribute, you need to use the text() attribute. Its still not clear to me what you are trying to accomplish, so I played a little and here's what I came up with for you to peruse. html head titleTest Page/title script src='jquery.js' type='text/javascript'/script script type=text/javascript $(function(event) { $('a.cartSummaryLink').click(function(event) { aLink = $(event.target); aLink.text( aLink.text().replace('Cart','My Shopping Bag')); event.preventDefault(); }); }); /script /head body a class=cartSummaryLink href=#View Cart/a /body /html HTH, Joe On Wed, Nov 11, 2009 at 5:32 AM, Joe Moore joe.lynn.mo...@gmail.com wrote: So the jquery code executes when they click on the link? If so, do you have a click event attached to the links and this code is on it? On Nov 10, 2009 10:46 PM, Daybreak0 daybre...@gmail.com wrote: Joe Here is the Html fom above - I should have continued it into the conversations. HTML Code: div class=cart-summaryspan id=catCartSummary quote=False vertical=Falsetable cellspacin... The CSS class of the link a class=cartSummaryLink href=/ OrderRetrievev2.aspx?CatalogueID=45965View Cart/a is '.cartSummaryLink' The Jquery code is of course $('.cartSummaryLink').val( $(this).val().replace('Cart','My Shopping Bag') $(this) is meant to be equal to 'View Cart' Thanks On Nov 11, 2:05 pm, Joe Moore joe.lynn.mo...@gmail.com wrote: Well, what are you expecting $(t... On Nov 10, 2009 8:42 PM, Daybreak0 daybre...@gmail.com wrote: Joe and Marcel - I see. ...
Re: [jQuery] Re: Error '$this' is undefined
Then something like this: html head titleTest Page/title script src='jquery.js' type='text/javascript'/script script type=text/javascript $(function() { $('a.cartSummaryLink').each(function(i) { $(this).text( $(this).text().replace('Cart','My Shopping Bag')); }); }); /script /head body a id='link1' class=cartSummaryLink href=#View Cart/a /body /html Joe On Wed, Nov 11, 2009 at 7:30 AM, Daybreak0 daybre...@gmail.com wrote: Joe No I dont want anything to happen when you click on the link I want to change it beforehand. Basically ON LOAD of the html I need certain text replaced by my text. There is certain text that I can not control through HTML or in the backend, which needs to be replaced by my text. Not just this link, but I can choose the incorrect text, by either the CSS Class or ID. For Example: $('.cartSummaryLink').val was my attempt to get the value of the incorrect text (being View Cart) and the rest of my code was my attempt to replace part of that text (Cart) with my text.
Re: [jQuery] .hide and .show div's
$( function() { $(div[class=hide-BAT$].hide(); }); I haven't tested this, but it should work. If not, verify the selector. Not sure why you are giving a unique classname to all these elements. If you need it, why not use the I'd attribute? Regards, Joe On Nov 11, 2009 8:17 AM, David pr davidpric...@gmail.com wrote: Hello, Could you help me please. I have a list of hotel which I .hide and .show div's to show more or less info. so i have div class=Hide-BAT1 ... to div class=Hide-Bat55 … when the user press a button I use the code var Hcode = $(this).attr(custom); $('div.Hide-' + Hcode).toggle(); but when the page loads how do I hide this div automatically ? I have used for (i = 0; i = 70; i++) { $(div.Hide-BAT + i).hide(); } But its slow and probably not the best way to do it ? Hope you can help and this makes sense. Regards David
Re: [jQuery] .hide and .show div's
Oops. got the selector wrong. It should be: $( function() { $(div[class^=hide-BAT].hide(); }); Joe On Wed, Nov 11, 2009 at 8:38 AM, Joe Moore joe.lynn.mo...@gmail.com wrote: $( function() { $(div[class=hide-BAT$].hide(); }); I haven't tested this, but it should work. If not, verify the selector. Not sure why you are giving a unique classname to all these elements. If you need it, why not use the I'd attribute? Regards, Joe On Nov 11, 2009 8:17 AM, David pr davidpric...@gmail.com wrote: Hello, Could you help me please. I have a list of hotel which I .hide and .show div's to show more or less info. so i have div class=Hide-BAT1 ... to div class=Hide-Bat55 … when the user press a button I use the code var Hcode = $(this).attr(custom); $('div.Hide-' + Hcode).toggle(); but when the page loads how do I hide this div automatically ? I have used for (i = 0; i = 70; i++) { $(div.Hide-BAT + i).hide(); } But its slow and probably not the best way to do it ? Hope you can help and this makes sense. Regards David
Re: [jQuery] Re: .hide and .show div's
Oops! Thanks for the catch! The other thing to understand is that this wont work for browsers that have JavaScript disabled. On Nov 11, 2009 9:16 AM, MorningZ morni...@gmail.com wrote: Oops. got the selector wrong. It should be: $( function() { $(div[class^=hide-BAT].hide(); ... You still didn't get it right :-) $(div[class^=Hide-BAT]).hide(); To original poster: if you want fast, then you can't beat CSS with jQuery's hide method have like: div class=Hide BAT1 div class=Hide BAT1 . div class=Hide BAT55 and now the CSS class Hide is defined like so: .Hide { display: none; } But, I'd suggest really reading into some replies above, you shouldn't be using class names this way. if your div needs to be uniquely identified, then ID is the way to go, and the class name BAT would be used to grab all those uniquely identified div's so building on that (note: id's are not supposed to start with numbers, hence the B): div id=B1 class=Hide div id=B2 class=Hide . div id=B55 class=Hide so now on page load, it'll see: .Hide { display: none; } and not show all 55 div's want to do something to item 35? function Action(id) { $(#B + id).doSomething } Action(35) want to do something to all 55 items? $(.Hide).show() doesn't that seem easier plus more importantly make more sense? something like the suggested selector against your current structure $(div[class^=hide-BAT]).hide(); while it *would work*, you need to understand why it is slow... - first jQuery walks across the whole entire DOM tree grabbing every single div, and that's whether it's one you are after or not - then id needs to get every single class name, and do a (relatively to other methods anyways) slow end with operator Yuck and just think if you had 200 of those div's, or 400 ! On Nov 11, 8:58 am, Joe Moore joe.lynn.mo...@gmail.com wrote: Oops. got the selector wrong. I... On Wed, Nov 11, 2009 at 8:38 AM, Joe Moore joe.lynn.mo...@gmail.com wrote: $( function() { ... On Nov 11, 2009 8:17 AM, David pr davidpric...@gmail.com wrote: Hello,Could you...
Re: [jQuery] button value change
David, Here's one way, using the toggle event (really a click event, check out: http://docs.jquery.com/Events/toggle#fnfn2fn3.2Cfn4.2C...) html head titleTest Page/title script src='jquery.js' type='text/javascript'/script script type=text/javascript $(function() { $('a.detailLink').toggle( function(event) { $(this).text('Hide Details'); }, function(event) { $(this).text( 'More Details'); } ); $('div[class^=hide-BAT]').hide(); }); /script /head body a id='link1' class=detailLink href=#More Details/a /body /html HTH, Joe On Wed, Nov 11, 2009 at 1:01 PM, David pr davidpric...@gmail.com wrote: Hello, I had an a href a href=# id=hide2 title=Click to see detailsMore details/ a $(this).text($(this).text() == 'More details' ? 'Hide details' : 'More details'); and on click I changed the text from more to hide I had to change the a href to input type=button id=hide2B value=More details / How do I change the value text on click ? David
Re: [jQuery] IE7 onclick object.function
Is there some reason you don't want to put this onclick event in a script tag in the head section? Like, html head titleTest Page/title script src='jquery.js' type='text/javascript'/script script type=text/javascript $(function() { $('a.detailLink').click( function(event) { //stop the events default action - stops click. event.preventDefault(); //stop propagation so the event doesn't bubble up. event.stopPropagation(); //run custom function. cutsom_function(parameters); } ); }); /script /head body a id='link1' class=detailLink href=#More Details/a /body /html HTH, Joe On Wed, Nov 11, 2009 at 1:14 PM, Matthew mvbo...@gmail.com wrote: I posted this earlier, but perhaps I didn't explain it right. Im trying to get code that uses this syntax to work in IE6/7 a href=some link onclick=$(this).function(parameters); return false; It seems like IE6/7 do not like the $(this).function syntax, although if I just alert($(this)) I get [object Object] which I think is what should be expected. I am using a custom jQuery plugin. A watered down version can be seen here: http://jsbin.com/ehoxu Thanks in advance.
Re: [jQuery] Re: IE7 onclick object.function
Mmm... I'm thinking there's a better way to do it, but as I'm not familiar with the code you are dealing with, here's what I came up with, basically you aren't using jQuery. html head titleTest Page/title script src='jquery.js' type='text/javascript'/script script type=text/javascript $(function() { $('a.detailLink').click( function(event) { //stop the events default action and propagation. event.stopPropagation(); event.preventDefault(); //run custom function. //cutsom_function(parameters); } ); }); function custom_function( varone, vartwo, varthree, varfour, varfive) { alert(varone: + varone + \n + vartwo: + vartwo + \n + varthree: + varthree + \n + varfour: + varfour + \n + varfive: + varfive ); } /script /head body a id='link1' class=detailLink href=# onclick=custom_function(1,2,3,4,5); return false;More Details/a /body /html Joe On Wed, Nov 11, 2009 at 2:06 PM, Matthew mvbo...@gmail.com wrote: I'm passing about 5 parameters to the function that are coming from php running in a loop. So I was thinking I needed to use the onclick on the a tag so that I could just pass the php variables as parameters right there in the loop instead of storing them somehow and referencing them after the page load. On Nov 11, 10:54 am, Joe Moore joe.lynn.mo...@gmail.com wrote: Is there some reason you don't want to put this onclick event in a script tag in the head section? Like, html head titleTest Page/title script src='jquery.js' type='text/javascript'/script script type=text/javascript $(function() { $('a.detailLink').click( function(event) { //stop the events default action - stops click. event.preventDefault(); //stop propagation so the event doesn't bubble up. event.stopPropagation(); //run custom function. cutsom_function(parameters); } ); }); /script /head body a id='link1' class=detailLink href=#More Details/a /body /html HTH, Joe On Wed, Nov 11, 2009 at 1:14 PM, Matthew mvbo...@gmail.com wrote: I posted this earlier, but perhaps I didn't explain it right. Im trying to get code that uses this syntax to work in IE6/7 a href=some link onclick=$(this).function(parameters); return false; It seems like IE6/7 do not like the $(this).function syntax, although if I just alert($(this)) I get [object Object] which I think is what should be expected. I am using a custom jQuery plugin. A watered down version can be seen here:http://jsbin.com/ehoxu Thanks in advance.
Re: [jQuery] Re: IE7 onclick object.function
Well, maybe all is not lost. How about this, which uses jQuery inside the function. Then you could call your plugin, I bet. Still not the best, but perhaps it will work. html head titleTest Page/title script src='jquery.js' type='text/javascript'/script script type=text/javascript $(function() { $('a.detailLink').click( function(event) { //stop the events default action and propagation. event.stopPropagation(); event.preventDefault(); //run custom function. //cutsom_function(parameters); } ); }); function custom_function(obj, varone, vartwo, varthree, varfour, varfive) { var elem = $(obj); alert(This: + elem.attr('id') + \n + varone: + varone + \n + vartwo: + vartwo + \n + varthree: + varthree + \n + varfour: + varfour + \n + varfive: + varfive ); } /script /head body a id='link1' class=detailLink href=# onclick=custom_function(this,1,2,3,4,5); return false;More Details/a /body /html Joe On Wed, Nov 11, 2009 at 2:52 PM, Matthew mvbo...@gmail.com wrote: Thanks for the help Joe. Originally most of the on-page script was just javascript, but the function call was to a custom jQuery plugin. I did a modified version of what you suggested and rewrote the plugin to just be basic functions with parameters. Seems to work now, I'm just bummed I couldn't keep the jQuery plugin because IE7 decided it wasn't going to let it work with onclick. Thanks again. On Nov 11, 11:17 am, Joe Moore joe.lynn.mo...@gmail.com wrote: Mmm... I'm thinking there's a better way to do it, but as I'm not familiar with the code you are dealing with, here's what I came up with, basically you aren't using jQuery. html head titleTest Page/title script src='jquery.js' type='text/javascript'/script script type=text/javascript $(function() { $('a.detailLink').click( function(event) { //stop the events default action and propagation. event.stopPropagation(); event.preventDefault(); //run custom function. //cutsom_function(parameters); } ); }); function custom_function( varone, vartwo, varthree, varfour, varfive) { alert(varone: + varone + \n + vartwo: + vartwo + \n + varthree: + varthree + \n + varfour: + varfour + \n + varfive: + varfive ); } /script /head body a id='link1' class=detailLink href=# onclick=custom_function(1,2,3,4,5); return false;More Details/a /body /html Joe On Wed, Nov 11, 2009 at 2:06 PM, Matthew mvbo...@gmail.com wrote: I'm passing about 5 parameters to the function that are coming from php running in a loop. So I was thinking I needed to use the onclick on the a tag so that I could just pass the php variables as parameters right there in the loop instead of storing them somehow and referencing them after the page load. On Nov 11, 10:54 am, Joe Moore joe.lynn.mo...@gmail.com wrote: Is there some reason you don't want to put this onclick event in a script tag in the head section? Like, html head titleTest Page/title script src='jquery.js' type='text/javascript'/script script type=text/javascript $(function() { $('a.detailLink').click( function(event) { //stop the events default action - stops click. event.preventDefault(); //stop propagation so the event doesn't bubble up. event.stopPropagation(); //run custom function. cutsom_function(parameters); } ); }); /script /head body a id='link1' class=detailLink href=#More Details/a /body /html HTH, Joe On Wed, Nov 11, 2009 at 1:14 PM, Matthew mvbo...@gmail.com wrote: I posted this earlier, but perhaps I didn't explain it right. Im trying to get code that uses this syntax to work in IE6/7 a href=some link onclick=$(this).function(parameters); return false
Re: [jQuery] Error '$this' is undefined
$this should be $(this). Hth, Joe On Nov 10, 2009 2:12 PM, Daybreak0 daybre...@gmail.com wrote: Hi all, I have the following html, of which I want to replace the text Cart with My Shopping Bag (The Veiw Cart text is near the end) Code: div class=cart-summaryspan id=catCartSummary quote=False vertical=Falsetable cellspacing=0 class=cartSummaryTabletrtd class=cartSummaryItem1 item(s), Total: #163;0.00 a class=cartSummaryLink href=/ OrderRetrievev2.aspx?CatalogueID=45965View Cart/a/td/tr/ table/span/div Now I need the ability to actually choose the actual text I want to replace, as there is other text, where I can not replace the whole text line due to different numbers produced on the fly, so I cant use the following, which does work. Code: $(.cartSummaryLink).html(View My Shopping Bag'); I need to use the following one, but my experience is poor Code: $('.cartSummaryLink').val( $this.val().replace('Cart','My Shopping Bag') ); I get the following error Message: '$this' is undefined any help will be appreciated. Thanks John
Re: [jQuery] Re: Error '$this' is undefined
Well, what are you expecting $(this) to be? What code (HTML JavaScript ) do you have to show us? On Nov 10, 2009 8:42 PM, Daybreak0 daybre...@gmail.com wrote: Joe and Marcel - I see. Thank you $('.cartSummaryLink').val( $(this).val().replace('Cart','My Shopping Bag') ); No errors occur but it does not work. I am not sure why, as its beyond my limited knowledge, but there must be a way to replace certain text.