Re: [jQuery] Delete Row table using jquery
This should do your work. Get a try $(document).ready(function() { $(a).click(function(event) { alert(As you can see, the link no longer took you to jquery.com ); var href = $(this).attr('href'); alert(href); event.preventDefault(); * $.get(href ); return false;* }); ); -- http://ranacseruet.blogspot.com/
Re: [jQuery] keep executing the script after a few seconds
use jquery's timer plugin for more efficiency. http://plugins.jquery.com/project/timers -- http://ranacseruet.blogspot.com/ On Wed, Jan 13, 2010 at 2:50 PM, bjorsq p...@bjorsq.net wrote: setInterval(function(){alert(hello);},9); http://www.elated.com/articles/javascript-timers-with-settimeout-and-setinterval/ runrunforest wrote: Say i want the alert message hello appear every 90 seconds, how can i do it ? -- View this message in context: http://old.nabble.com/keep-executing-the-script-after-a-few-seconds-tp27138586s27240p27141453.html Sent from the jQuery General Discussion mailing list archive at Nabble.com.
Re: [jQuery] Re: Generating a CSV of values from a bunch of Checkboxes with same id
$(this).attr('title') -- http://ranacseruet.blogspot.com/ On Mon, Jan 11, 2010 at 11:58 AM, swfobject_fan guru4v...@gmail.com wrote: Peter, The $(this).getAttribute didn't work for me in any browser. I changed it to this: checkedGenres.push(this.getAttribute('title')); But is this a standard method? Safer? -guru On 9 Jan, 20:30, Peter Edwards p...@bjorsq.net wrote: You could use the title attribute rather than your non-standard txt attribute, and achieve the same thing using: script type=text/javascript $(document).ready(function(){ $(#tryme).click( function(){ var checkedGenres = []; $(input[rel='genre']:checked).each(function(){ checkedGenres.push($(this).getAttribute('title')); }); alert( checkedGenres.join(, ) ); $(#divGenres).text(checkedGenres.join(, )); });}); /script on 09/01/2010 13:57 swfobject_fan said:: Hi, I'm using this piece of code to find a set of selected check boxes that are selected abd build a comma separated list from their values ('txt' custom attribute). Is this a jQuery standard method? e.g input type=checkbox id=chkGenre rel=genre value=12 txt=Rock / br / input type=checkbox id=chkGenre rel=genre value=13 txt=Jazz / script type=text/javascript $(document).ready(function(){ $(#tryme).click( function(){ var oChecked = $(input[rel='genre']:checked); var checkedGenres = new Array; for( var i=0; ioChecked.length; i++ ) { checkedGenres[i] = oChecked[i].getAttribute('txt'); } alert( checkedGenres.join(, ) ); $(#divGenres).text(checkedGenres.join(, )); }); }); /script
Re: [jQuery] Re: (autocomplete) Half of page disappears in IE7 when autocomplete list shows
Your css probably conflicting with autocomplete plugin's some css/ css class names.. Check carefully... -- http://ranacseruet.blogspot.com/
[jQuery] Jquery color animation problem
I am trying to do it: $(this).animate({opacity:1},700); it looks fine in firefox, but the texts getting very odd look in ie 6 and ie 7. Is there any way to fix it? Also, i trie to change color like $(this).animate({color:#FF},700); and its not working. Please help... -- http://ranacseruet.blogspot.com/
Re: [jQuery] Convert a string version of a json array to an actual json array
for(var i = 0; i arrCss.length; i++){ var snip = arrCss[i].split(___); eval(var temp=+snip[1]); $(snip[0]).css(temp); } this may work, try it(although i didnt't try yet) -- http://ranacseruet.blogspot.com
Re: [jQuery] Need An Example On Parsing My XML
This should be done using alert($(data).find(ns3:userName).text()). Please try this out...(though i didn't try) -- http://ranacseruet.blogspot.com
Re: [jQuery] Autocomplete
loop through all the items in array and use item.replace(,,',) this should be ok now... -- http://ranacseruet.blogspot.com/
Re: [jQuery] Autocomplete
i just tried with this cities = [TownOne, County, Town Two, County, Town Three, County, TownFour, County]; $(#suggest1).autocomplete(cities); its working correctly. The problem you said, event doesn't appear. So, can you explain what you r using and what is happening actually? Regards ranacseruet http://ranacseruet.blogspot.com
Re: [jQuery] Autocomplete
If you want to match ignoring the comma(may be this is what you want), then you have to pass some extra parameters and some more suggestion will show up besides the expected.. $(#suggest1).focus().autocomplete(cities, {multiple: true, multipleSeparator: , matchContains:true} ); -- http://ranacseruet.blogspot.com/
Re: [jQuery] Re: How to check whether an element is bound to an event or not?
I don't know about this much. But, just a while ago, i wa having problem binding focus event with live() method. Just solved it by the following code that i found somewhere on internet: (function(){ var special = jQuery.event.special, uid1 = 'D' + (+new Date()), uid2 = 'D' + (+new Date() + 1); jQuery.event.special.focus = { setup: function() { var _self = this, handler = function(e) { e = jQuery.event.fix(e); e.type = 'focus'; if (_self === document) { jQuery.event.handle.call(_self, e); } }; jQuery(this).data(uid1, handler); if (_self === document) { /* Must be live() */ if (_self.addEventListener) { _self.addEventListener('focus', handler, true); } else { _self.attachEvent('onfocusin', handler); } } else { return false; } }, teardown: function() { var handler = jQuery(this).data(uid1); if (this === document) { if (this.removeEventListener) { this.removeEventListener('focus', handler, true); } else { this.detachEvent('onfocusin', handler); } } } }; jQuery.event.special.blur = { setup: function() { var _self = this, handler = function(e) { e = jQuery.event.fix(e); e.type = 'blur'; if (_self === document) { jQuery.event.handle.call(_self, e); } }; jQuery(this).data(uid2, handler); if (_self === document) { /* Must be live() */ if (_self.addEventListener) { _self.addEventListener('blur', handler, true); } else { _self.attachEvent('onfocusout', handler); } } else { return false; } }, teardown: function() { var handler = jQuery(this).data(uid2); if (this === document) { if (this.removeEventListener) { this.removeEventListener('blur', handler, true); } else { this.detachEvent('onfocusout', handler); } } } }; })(); -- http://ranacseruet.blogspot.com/
Re: [jQuery] How to check whether an element is bound to an event or not?
hi, thanks. But, what is happening here is: There is an DOM element, which is reloading(replaced by ajax response with same id/tag), then the event isn't no more bounded. I want it to be bounded all the time. Do you think, here unbound will work? Or Is there any way to keep the binding whenever a new element is being loaded? Regards On Sun, Jan 3, 2010 at 1:41 AM, waseem sabjee waseemsab...@gmail.comwrote: usually when I bind a click event I do this. unbind before bind $(elm).unbind('click'); $(elm).bind(click, function() { }); may be a modification like this if(!$(elm).unbind('click')) { $(elm).bind(click, function() { alert(This element was only bound if it was not bound); }); } On Sat, Jan 2, 2010 at 7:28 PM, ranacseruet ranacser...@gmail.com wrote: I need to check whether an element is bound to an event or not. How to achieve this? -- http://ranacseruet.blogspot.com/
Re: [jQuery] Re: How to check whether an element is bound to an event or not?
Hi, Thanks for your reply. It helped me a lot. Regards