[jQuery] Re: click action effect/problem

2010-01-20 Thread Scott Sauyet
> I'd like to thank you guys again for the quick response, but for some > reason, both methods aren't working. I made two suggestions. MorningZ's suggestion was very much like my first one. My second one is a bit more general, and might help. I modified MorningZ's page here: http://jsbin.c

[jQuery] Re: click action effect/problem

2010-01-18 Thread Legostrat
I'd like to thank you guys again for the quick response, but for some reason, both methods aren't working. With the first method, when you click on the containing div, in this case #twitter, it reveals the div with the content, #flwtwitter. However, when you click on it a second time it tries to

[jQuery] Re: click action effect/problem

2010-01-18 Thread Legostrat
Thanks guys!

[jQuery] Re: click action effect/problem

2010-01-18 Thread Scott Sauyet
On Jan 18, 4:07 pm, Legostrat wrote: > >    Click here >       >        option 1 >        option 2 >       > > > So, when you click on the button div, it reveals the sub-menu div. > The problem is that when you click on the content within the sub-menu > it activates the .click action attached

[jQuery] Re: click action effect/problem

2010-01-18 Thread MorningZ
Hope this helps put you on the path http://jsbin.com/ejuga3 (run) http://jsbin.com/ejuga3/edit (edit) Event Delegation = awesome knowledge to have http://www.learningjquery.com/2008/03/working-with-events-part-1 On Jan 18, 4:07 pm, Legostrat wrote: > Hey, > > I've got a toolbar on the bottom o

[jQuery] Re: click event is not working

2010-01-08 Thread CreativeMind
thanx a lot! On Jan 8, 3:07 am, Charlie Griefer wrote: > http://docs.jquery.com/Events/live > > > > On Thu, Jan 7, 2010 at 2:01 PM, CreativeMind wrote: > > hi, > > i'm appending a child div in a parent div. parent div has already > > child div's which have classes ws_c1 and plus. > > > $('').add

[jQuery] Re: click(function{ problem with Firefox

2009-12-24 Thread turnavies
ah look at that, img is an inline element :D standards ftw! On 24 dec, 23:10, turnavies wrote: > Thanks for your replies! > FF is happy now, although it's not fully standards-compliant (I still > have an img inside my label), but the code is a lot cleaner and it > works on the major browsers (hav

[jQuery] Re: click(function{ problem with Firefox

2009-12-24 Thread turnavies
Thanks for your replies! FF is happy now, although it's not fully standards-compliant (I still have an img inside my label), but the code is a lot cleaner and it works on the major browsers (haven't tested IE though :D) Nice diagram! Thomas

[jQuery] Re: click(function{ problem with Firefox

2009-12-24 Thread Šime Vidas
Yea, that happens if you don't follow the standard some browser will break your code :) For a comprehensive overview of propper HTML nesting rules, consult my diagram: http://vidasp.net/HTMLstructure.htm

[jQuery] Re: Click event outside of an element

2009-12-03 Thread Keysher
Umm, It seems fine, I'll check it later. Thanks! On 23 nov, 15:13, Dustan wrote: > Perhaps something along these lines is what you are looking for? > > $(document).click(function(event) { >     if (!$(event.target).hasClass('classname')) { >         // run this code if anywhere in the document e

[jQuery] Re: Click Even

2009-12-03 Thread shapper
On Dec 3, 2:52 am, JMcGinnis wrote: > y0, Not really, why do you need to/ or want to? you could do this > > $('#Play').click(function() { $.cookies.set('WCA.Player', 'Play', { path: > '/' }) }) > > ha, j/k same thing, just one line.  Could you just explain why you would > like to do it a different

[jQuery] Re: Click event outside of an element

2009-11-23 Thread Dustan
Perhaps something along these lines is what you are looking for? $(document).click(function(event) { if (!$(event.target).hasClass('classname')) { // run this code if anywhere in the document except the item is clicked } }); On Nov 20, 8:29 am, Keysher wrote: > Hi! > > I am newbi

[jQuery] Re: Click event outside of an element

2009-11-22 Thread Keysher
Works fine! Thanks!! :o) On 21 nov, 15:29, mofle wrote: > Here you go: > > $(document).click(function(){ >         alert('clicked outside classname'); > > }); > > $('.classname').click(function(e){ >         e.stopPropagation(); > > }); > > First you bind a click event to the document with the a

[jQuery] Re: Click event outside of an element

2009-11-21 Thread mofle
Here you go: $(document).click(function(){ alert('clicked outside classname'); }); $('.classname').click(function(e){ e.stopPropagation(); }); First you bind a click event to the document with the action you want. Then you bind the classname to stop it from propagate up to the d

[jQuery] Re: Click not running on IE

2009-10-30 Thread James
What value is in "r"? Does it have something like a # or . that makes it a valid selector? For example, in your code below: var blocco = r + " div.pul"; $(blocco).each(function (i) blocco may become 'testdiv.pul' $(blocco), will become $('testdiv.pul'), which does nothing because there's no elem

[jQuery] Re: Click multiple times, different states, saves different data to DB (confusing?)

2009-10-22 Thread The Danny Bos
Thanks man, I'll give it a whirl ... Thanks for all your time and energy. d On Oct 23, 4:19 am, mkmanning wrote: > Something like this (untested): > > var arrValues = ['c1','c2','c3','c3'], > cnameIndex = $.inArray(this.className,arrValues)+1; > this.className = cnameIndex===arrValues.length

[jQuery] Re: Click multiple times, different states, saves different data to DB (confusing?)

2009-10-22 Thread mkmanning
Something like this (untested): var arrValues = ['c1','c2','c3','c3'], cnameIndex = $.inArray(this.className,arrValues)+1; this.className = cnameIndex===arrValues.length?0: cnameIndex ]; if you can live with only one classname, otherwise you'll have to add code to remove the old classname from a

[jQuery] Re: Click multiple times, different states, saves different data to DB (confusing?)

2009-10-22 Thread The Danny Bos
Thanks so much man, That'll work well ... One more thing, how would I change it to point to classes instead of direct colours? var arrValues = ['c1','c2','c3','c3'], Thanks again, On Oct 22, 6:27 pm, mkmanning wrote: > Yeah, the snippet I wrote updates the color; you can add an ajax call

[jQuery] Re: Click multiple times, different states, saves different data to DB (confusing?)

2009-10-22 Thread mkmanning
Yeah, the snippet I wrote updates the color; you can add an ajax call to update your db as well, if the value your updating in the db is the color, or else the value is in an array that's indexed the same. On Oct 22, 12:10 am, The Danny Bos wrote: > For each click of the DIV I'm hoping to change

[jQuery] Re: Click multiple times, different states, saves different data to DB (confusing?)

2009-10-22 Thread The Danny Bos
For each click of the DIV I'm hoping to change the BackgroundColor, make some updates in the Database (depending on which array selection it's on) and that's about it. So, the first click of the DIV = "Change BG to 'green', update DB field to 'XXX'" the second click of the DIV = "Change the BG t

[jQuery] Re: Click multiple times, different states, saves different data to DB (confusing?)

2009-10-22 Thread mkmanning
Well, if you just want to loop through the array to change the background color, you don't really need toggle then. Try this: $("#item_list > li > div > a").click(function(){ var arrValues = ['rgb(9, 128, 0)','rgb(0, 255, 255)','rgb(0, 0, 255)','rgb(128, 0, 128)'], bgcolor = $.inArray($(this

[jQuery] Re: Click multiple times, different states, saves different data to DB (confusing?)

2009-10-21 Thread The Danny Bos
Thanks, had a good read, figured it out in part. Now I'm stuck trying to introduce an array to do my bidding ... Example below. The array is an example of how I want to loop through to use those values. Underneath is the perfect code for clicking an Anchor and changing its BGcolour differently e

[jQuery] Re: Click multiple times, different states, saves different data to DB (confusing?)

2009-10-21 Thread mkmanning
.toggle() allows you to rotate through multiple functions, you might want to check it out in the docs: http://docs.jquery.com/Events/toggle#fnfn2fn3.2Cfn4.2C... On Oct 21, 2:58 am, The Danny Bos wrote: > I've got one for ya, JQuery and Ajax. > > I want to have a button image, let's stay it's in

[jQuery] Re: click function populating value in a hidden field

2009-10-01 Thread Chuk
Works like a charm! Thanks so much! :)

[jQuery] Re: click function populating value in a hidden field

2009-10-01 Thread Chuk
Works like a charm! Thanks so much! :)

[jQuery] Re: click function populating value in a hidden field

2009-10-01 Thread Chuk
Works like a charm! Thanks so much! :)

[jQuery] Re: click function populating value in a hidden field

2009-10-01 Thread James
Suppose your rows looked like this: text text text $("tr").click(function () { $(".clicked").removeClass("clicked"); $(this).addClass("clicked"); var row_id = this.id.split('_')[1]; // e.g. 2 $("#hiddenField").val(row_id); // hiddenField is the ID of the hidden field }); On

[jQuery] Re: .click() fires my callback more than once

2009-09-25 Thread allenm541
I've run into this problem many times as well. The issue is that your click function is being bound more than once. To fix it, use the .unbind() method. .unbind() without any parameters will unbind everything bound to that element, including your .click() function. However, if you wish to unbin

[jQuery] Re: .click() fires my callback more than once

2009-09-24 Thread Liam Potter
probably because you have click handlers inside the confirmAction function, which is run on click itself. Fabdrol wrote: Hi guys, I'm facing this little problem, I've got a button toolbar, and users can select rows in a table. When they have selected some row's, they can click one of the butt

[jQuery] Re: click a button returned by ajax

2009-09-09 Thread Carlos Santos
function live was what I needed. But now another question. it's possible to make a POSTwith AJAX, via a button also created with AJAX, and store the return in a CONTAINER that does not exist in the DOM, but must exist when the POST is done? I.E. /*Action on a button that still exist in the DOM*/

[jQuery] Re: click a button returned by ajax

2009-09-08 Thread rupak mandal
Hi carlos try to use http://docs.jquery.com/Events/live thanks Rupak On Tue, Sep 8, 2009 at 8:54 PM, Carlos Santos wrote: > > I have a button that do appear on my page through a post with jquery: > > $.post( >'more_item.php',{ >NumItem: Nu

[jQuery] Re: click a button returned by ajax

2009-09-08 Thread MorningZ
There's no reason why this shouldn't work... remember you cannot wire an event to something that isn't on the DOM unless you: (1) use the ".live()" functionality of jQuery (http://docs.jquery.com/ Events/live#typefn) or (2) do it after it is in the DOM, which my code shows below $.post(

[jQuery] Re: Click event not working?

2009-08-27 Thread James
Could you show us what your animate_next() function looks like? On Aug 26, 3:04 pm, Kris S wrote: > I'm trying to execute a function "animate_next()" when a "div" element > is clicked, but it isn't working. Here is what it looks like.. > > $('#playground').click(function(){animate_next();}); > >

[jQuery] Re: Click event not working?

2009-08-27 Thread Cesar Sanz
mmm.. try this.. Put a border to your div, let's say border: 10px, then click the border to see what happen.. - Original Message - From: "Kris S" To: "jQuery (English)" Sent: Wednesday, August 26, 2009 7:04 PM Subject: [jQuery] Click event not working? I'm trying to execute a

[jQuery] Re: Click Binding not Working

2009-08-25 Thread Richard D. Worth
You need to use the ID selector (#): $('#btnInput').click(showVal); $('#btnInput').bind('click', showVal); - Richard On Wed, Aug 26, 2009 at 2:18 AM, S2 wrote: > > I have this code that works: > > var btnInput= document.getElementById('btnInput'); > btnInput.addEventListener("click", showVal, t

[jQuery] Re: click-event-handler for dynamically created a-elements?

2009-08-20 Thread ak732
There are a lot of ways to do this, here are a couple: $("#div99").append("I am in div99").click (function(){alert("hello world");}); $("").attr({id:"alnDiv99", href:"#"}).text("I am in div99").click (function(){alert("hello world");}).appendTo("#div99"); On Aug 20, 6:42 am, Audrey A Lee wrot

[jQuery] Re: click-event-handler for dynamically created a-elements?

2009-08-20 Thread ak732
You might also want to check go to http://api.jquery.com and check out the "live" method under Events-->Live Events. On Aug 20, 9:43 am, ak732 wrote: > There are a lot of ways to do this, here are a couple: > > $("#div99").append("I am in div99").click > (function(){alert("hello world");}); > >

[jQuery] Re: Click() Not Working

2009-08-14 Thread James
Just to clarify that further, click() on a doesn't perform a mouse click on a link and follow through. It calls the onclick event attached to the elements, which you don't have set, so it does nothing. On Aug 14, 4:08 pm, "Richard D. Worth" wrote: > It doesn't work to call .click() on an A, i

[jQuery] Re: Click() Not Working

2009-08-14 Thread Richard D. Worth
It doesn't work to call .click() on an A, if you want to navigate a link's href. Instead: window.location = $("td a.menu:contains('Main')").attr('href'); - Richard On Fri, Aug 14, 2009 at 7:32 PM, S2 wrote: > > http://www.w3.org/ > TR/html4/strict.dtd"> > > > > > > > > $(

[jQuery] Re: Click() Not Working

2009-08-14 Thread S2
http://www.w3.org/ TR/html4/strict.dtd"> $(function(){ $("td a.menu:contains('Main')").click(); }); Main On Aug 13, 6

[jQuery] Re: Click() Not Working

2009-08-13 Thread Jules
$("td a.menu:contains('Main')").click() should work. Can you post the html? On Aug 14, 4:48 am, S2 wrote: > This doesn't work in IE or Firefox: > > $("td a.menu:contains('Main')").click(); > > This works in IE: > > $("td a.menu:contains('Main')")[0].click(); > > $("td a.menu:contains('Main')").l

[jQuery] Re: Click event to load a new page

2009-08-06 Thread Simon
This is something that was bothering me too, and I came to the same conclusion. How is this for SEO though? Redirecting with Javascript that is? Does it recognize the link? Cheers, Simon On Aug 6, 3:52 pm, "paul.mac" wrote: > Thanks guys - came to the same conclusion shortly after posting the >

[jQuery] Re: Click event to load a new page

2009-08-06 Thread paul.mac
Thanks guys - came to the same conclusion shortly after posting the question. Thanks Paul On Aug 6, 7:52 pm, "Richard D. Worth" wrote: > Use > window.location > = "index.php?whichPage=slider&whichAct=0&subPage=mixnmingle"; > - Richard > > On Thu, Aug 6, 2009 at 2:35 PM, paul.mac > wrote: > >

[jQuery] Re: Click event to load a new page

2009-08-06 Thread Richard D. Worth
Use window.location = "index.php?whichPage=slider&whichAct=0&subPage=mixnmingle"; - Richard On Thu, Aug 6, 2009 at 2:35 PM, paul.mac wrote: > > I want to add a click function to an image to laod a new page > > Tried this but it doesn't work > > $("#i4").click(function(){ >$(document).attr("hr

[jQuery] Re: Click event to load a new page

2009-08-06 Thread James
Do you mean that when someone clicks on an image, it just goes to a different page? (Similar to a normal tag around an image.) If so: $("#i4").click(function() { document.location.href = 'index.php? whichPage=slider&whichAct=0&subPage=mixnmingle'; }); Or did you mean "load" an external page

[jQuery] Re: click treeview and then jqgrid refresh?

2009-07-20 Thread Orcun Avsar
You can use: $("#grid_id").trigger("reloadGrid"); it reloads grid with grid params that may be changed by browser user ( sorting name, page number), so if you want a full refresh or need changed options on grid , you may need to use something like this: $("#grid_id").setGridParam(default_paramete

[jQuery] Re: .click doesn't seem to respond to elements added with jQuery

2009-07-16 Thread borgsquad
try to use the .live method with the click listener blcArmadillo wrote: > > I'm working on creating a little suggestion/autocomplete code for form > fields. > > Here is the code I currently have written: > $(document).ready(function() { > $("#city").keyup(function() { > >

[jQuery] Re: Click events handling conflict due to prototype?

2009-06-23 Thread Steve the Canuck
ot;)) { > >e.preventDefault(); } }); On Jun 22, 3:17 pm, "Cesar > >Sanz"wrote:Use jQuery and not $ ----- Original > >Message - From: "StevetheCanuck"To: "jQuery > >(English)"Sent: Monday, June 22, 2009 10:34 AM > >Subject: [jQuery]

[jQuery] Re: Click events handling conflict due to prototype?

2009-06-22 Thread Steve the Canuck
} }); On Jun 22, 3:17 pm, "Cesar > Sanz"wrote:Use jQuery and not $ - Original > Message - From: "Steve the Canuck"To: "jQuery > (English)"Sent: Monday, June 22, 2009 10:34 AM > Subject: [jQuery] Re: Click events handling conflict due to prototype

[jQuery] Re: Click events handling conflict due to prototype?

2009-06-22 Thread Charlie
"Are you sure you want to cancel this booking?")) { e.preventDefault(); } }); On Jun 22, 3:17 pm, "Cesar Sanz" wrote: Use jQuery and not $ - Original Message - From: "Steve the Canuck" To: "jQuery (English)" Sent: Monday, J

[jQuery] Re: Click events handling conflict due to prototype?

2009-06-22 Thread Steve the Canuck
e.preventDefault(); } }); On Jun 22, 3:17 pm, "Cesar Sanz" wrote: > Use jQuery and not $ > > - Original Message - > From: "Steve the Canuck" > To: "jQuery (English)" > Sent: Monday, June 22, 2009 10:34 AM > Subject: [jQuery]

[jQuery] Re: Click events handling conflict due to prototype?

2009-06-22 Thread Cesar Sanz
Use jQuery and not $ - Original Message - From: "Steve the Canuck" To: "jQuery (English)" Sent: Monday, June 22, 2009 10:34 AM Subject: [jQuery] Re: Click events handling conflict due to prototype? Btw... I do have a workaround - register my click event on s

[jQuery] Re: Click events handling conflict due to prototype?

2009-06-22 Thread Steve the Canuck
Btw... I do have a workaround - register my click event on something outside the table, such as the body tag, and then check the original event target. I'd prefer to target just the list item and anchor though if possible. On Jun 22, 11:14 am, Steve the Canuck wrote: > Hi, > > I have a simple l

[jQuery] Re: click function on anchor element

2009-06-11 Thread Kean
Interesting! That's also the same with labeling object properties. The label will be casted into their string representation. asdf $('#ya').click(function(){ a = {}; a[this] = 1; cache = this; }); alert(a[cache.toString()]); // alerts 1 On Jun 11, 12:16 pm, Ricardo wrote: > Just clea

[jQuery] Re: click function on anchor element

2009-06-11 Thread Ricardo
Just clearing up what Pierre said: if the argument you passed to alert () is not a string, it's .toString() method will be called. For convenience, the toString on an anchor HTMLElement object returns it's href. Try this: $('a').get(0).toString(); or $('a').click(function(){ alert( this.toStri

[jQuery] Re: click function on anchor element

2009-06-11 Thread Chandan Luthra
Hi Bensanlau, try $('a').click(function(){ alert(*$(this)*); return false; }); Chandan Luthra Intelligrape Software Pvt. Ltd. Josh Billings - "Every man has his follies - and often they are the most interesting thing he has got."

[jQuery] Re: click function on anchor element

2009-06-11 Thread Pierre Bellan
Hi, I think that is because of the alert function. It needs a string and maybe for an anchor object, jquery introduces a toString method. With the console of firebug, there are no differences between anchor and images Pierre 2009/6/11 bensan...@gmail.com > > Hi all, > > I'm confused as to why

[jQuery] Re: Click event on dynamically-generated link

2009-06-04 Thread fredriley
Thanks to you as well for the swift reply. On Jun 4, 4:04 pm, MorningZ wrote: > I'd suggest to understand why your dynamic objects are wired up, > thoroughly read this article > > http://www.learningjquery.com/2008/03/working-with-events-part-1 Thanks, I'll read it carefully. > understanding "

[jQuery] Re: Click event on dynamically-generated link

2009-06-04 Thread fredriley
On Jun 4, 3:50 pm, waseem sabjee wrote: > $(".mylinkclass").live("click", function() { > alert("it Worked"); > > }): Thanks very much for the swift and helpful reply. I'd not come across 'live' before, but looking at the docs http://docs.jquery.com/Events/live it's plainly what I need, and it wo

[jQuery] Re: Click event on dynamically-generated link

2009-06-04 Thread MorningZ
I'd suggest to understand why your dynamic objects are wired up, thoroughly read this article http://www.learningjquery.com/2008/03/working-with-events-part-1 understanding "why" is the solution of fixing your issue as for "as even to do the simplest thing you need to fully internalise the who

[jQuery] Re: Click event on dynamically-generated link

2009-06-04 Thread waseem sabjee
$(".mylinkclass").live("click", function() { alert("it Worked"); }): if that fails try holding this script in one of the xml nodes $(function() { $(".mylinkclass").live("click", function() { alert("it Worked"); }): }); On Thu, Jun 4, 2009 at 4:46 PM, fredriley wrote: > > Sorry to post again

[jQuery] Re: Click Tracking - Works In IE Only

2009-05-29 Thread Up-Works
Thank you James - I will try this"What if you try to use $.ajax instead, and set the option 'async' to 'false', so that it waits for the AJAX response before the click- through occurs? "

[jQuery] Re: Click Tracking - Works In IE Only

2009-05-29 Thread James
That's strange. Maybe it's a race condition issue which may vary depending on your computer. I've tried this before for logging click- throughs and it worked fine. What if you try to use $.ajax instead, and set the option 'async' to 'false', so that it waits for the AJAX response before the click-

[jQuery] Re: Click Tracking - Works In IE Only

2009-05-29 Thread Up-Works
On May 29, 2:36 pm, James wrote: > "What" is not working? > Clicking the link does nothing? Does 'providerid' not have a value? Is > the AJAX not being sent? No AJAX response? In FF and Safari it does not fetch the $.get before loading the new page location, thus the ..lib/bannerTracking.php

[jQuery] Re: Click Tracking - Works In IE Only

2009-05-29 Thread Up-Works
On May 29, 2:54 pm, James wrote: > Try putting a "return false;" at the end of your click code so that it > doesn't go to the next page. See if the AJAX call works. > (Theoretically, it probably still should not if it didn't before.) > > I'm not sure what you're saying about the console display

[jQuery] Re: Click Tracking - Works In IE Only

2009-05-29 Thread James
Try putting a "return false;" at the end of your click code so that it doesn't go to the next page. See if the AJAX call works. (Theoretically, it probably still should not if it didn't before.) I'm not sure what you're saying about the console displaying the text in red. Does it also contain any

[jQuery] Re: Click Tracking - Works In IE Only

2009-05-29 Thread James
"What" is not working? Clicking the link does nothing? Does 'providerid' not have a value? Is the AJAX not being sent? No AJAX response? On May 29, 11:23 am, Up-Works wrote: > Need to know why this code below records the click in IE but does not > record the click in FF or Safari.  a.adBanner is

[jQuery] Re: Click Tracking - Works In IE Only

2009-05-29 Thread waseem sabjee
try using bind() instead of live() On Fri, May 29, 2009 at 11:23 PM, Up-Works wrote: > > Need to know why this code below records the click in IE but does not > record the click in FF or Safari. a.adBanner is an internal link > within the same domain. Thank you in advance. > > $('a.adBanner').

[jQuery] Re: Click event not fired when hide() called by blur()

2009-05-25 Thread cohq82
This works. Thanks On May 24, 11:29 pm, Ricardo wrote: > Set a flag on mousedown on the DIV to prevent blur (mousedown fires > first): > > $().ready(function(){ >  var divclick = false; > >  $('#aa') >   .focus(function() { >     $('#bb').show(); >   }) >   .blur(function() { >     if ( divc

[jQuery] Re: Click event not fired when hide() called by blur()

2009-05-25 Thread Ricardo
Set a flag on mousedown on the DIV to prevent blur (mousedown fires first): $().ready(function(){ var divclick = false; $('#aa') .focus(function() { $('#bb').show(); }) .blur(function() { if ( divclick ) return( divclick = false ); $('#bb').hide(); }); $('#bb') .click(fu

[jQuery] Re: .click function won't work twice? addClass and hasClass little problem

2009-05-19 Thread James
I think you want this: if($("#content").hasClass("blue")) { $("#content").removeClass("blue"); $("#content").addClass("red"); } if($("#content").hasClass("red"))

[jQuery] Re: Click-Event in Options/defaults

2009-05-15 Thread Geuintoo
This works, but is there no better way? $.each(opts.button, function(i, n){ var func = n.click; delete(n.click); var button = $('') .attr(n) .click(func); $("#rtfButtons").append(button); });

[jQuery] Re: Click-Event in Options/defaults

2009-05-15 Thread Geuintoo
"Keep in mind this recursively calls attr( key, value ) or attr ( key, fn ), so if one of the properties you are passing is a function, the function will be evaluated and not stored as the attribute itself." Question: The function should NOT will be evaluated... Any idea? Thanks!

[jQuery] Re: click() only binds to first match

2009-04-01 Thread MorningZ
Well, IDs are supposed to be *unique* on the page, which you do not have your selector would be better off like $("span.box").click() On Apr 1, 5:16 am, thalis wrote: > Hi all, > > I have 3 images. I want one of them to be displayed, and when user > clicks either on  1 or 2 to swap the >

[jQuery] Re: click(function() works only once per page load?

2009-03-29 Thread Mr. Zeph
Thanks On Sun, Mar 29, 2009 at 1:25 AM, Ricardo wrote: > That's as simple as changing $(".ajax_homes_primary_img").click > (function(){ to $(".ajax_homes_primary_img").live('click', function() Thanks, tried it, and even used livequery (amazing how fast this stuff is to pick up!), and I was sti

[jQuery] Re: click(function() works only once per page load?

2009-03-28 Thread Ricardo
Your click handler only applies to the elements matching ".ajax_homes_primary_img" at the time the click() function is called. When you replace it, the new element has no event listeners attached. You can either rebind the event every time you modify it, or use the 'live' function, which uses even

[jQuery] Re: Click event is not captured by jQuery after the link to click is rendered by AJAX through jQuery

2009-03-23 Thread tadatoshi
Thank you, Eric. It worked very well. In my previous example, I modified the code like this following your advice: jQuery(document).ready( function($) { jQuery( ".class-name-for-element-for-ajax" ).click( function() { ... jQuery.get( jQuery(this).attr("href"), { some_variab

[jQuery] Re: Click event is not captured by jQuery after the link to click is rendered by AJAX through jQuery

2009-03-23 Thread Eric Garside
It's because jQuery operates on the elements which already exist. Lets say for instance: Loads this page into div#ajax-content: When you first render the page, you're grabbing anything that exists. So: jQ1 = jQuery('.ajax-clickery'); // .length = 1 jQ2 = jQuery('.ajax-clickery-two'); // .l

[jQuery] Re: click here to earn money through online

2009-03-16 Thread Happy Hyderabad

[jQuery] Re: Click function dosen't work, after append new html data.

2009-03-11 Thread sure
Hi errant, Thank you very much for quick reply. Now it works good using live method. Your solution saves my lot of time. with Regards sure. On Mar 11, 1:32 pm, errant wrote: > That's because events are binded to existing elements. > > If you're using 1.3.x, take a look at "live" > me

[jQuery] Re: Click function dosen't work, after append new html data.

2009-03-11 Thread errant
That's because events are binded to existing elements. If you're using 1.3.x, take a look at "live" method: http://docs.jquery.com/Events/live#typefn. With previous versions, livequery plugin may be helpful: http://docs.jquery.com/Plugins/livequery On 11 мар, 09:25, sure wrote: > Hi all, >    

[jQuery] Re: click event and window.location problem in safari

2009-02-27 Thread Karl Rudd
Try this plugin: http://newism.com.au/blog/post/58/bigtarget-js-increasing-the-size-of-clickable-targets/ Karl Rudd On Sat, Feb 28, 2009 at 1:49 AM, introvert wrote: > > Hello > > I have a simple jquery code that will put a link (on click event) on a > division. The link is read from the ancho

[jQuery] Re: click event and window.location problem in safari

2009-02-27 Thread brian
I don't know what the problem is or how to fix it but I'm wondering why you need this onclick event at all. If you want the link to fill the entire div you might be able to just give the anchor display: block. On Fri, Feb 27, 2009 at 9:49 AM, introvert wrote: > > Hello > > I have a simple jquery

[jQuery] Re: .click to start dropdown, hover out to clear (mixing the two)

2009-02-18 Thread Karl Swedberg
Hi Pete, You don't need to use .hover() with an empty function. You can use .mouseleave() in jQuery 1.3.x or .bind('mouseleave') in 1.2.6. --Karl Karl Swedberg www.englishrules.com www.learningjquery.com On Feb 18, 2009, at 12:28 AM, pedalpete wrote: Ok, actually got this

[jQuery] Re: .click to start dropdown, hover out to clear (mixing the two)

2009-02-17 Thread pedalpete
Ok, actually got this working with the following code [code] $('form#filterList span.holdDate').click(function(){ $('span#datePickers, div.datepicker').slideDown('fast'); $('span#datePickers, div.datepicker').hover( function(

[jQuery] Re: .click to start dropdown, hover out to clear (mixing the two)

2009-02-17 Thread pedalpete
right, so does that mean their is no way to specify only the hover out in jquery? On Feb 17, 6:21 pm, James wrote: > The syntax for hover() is hover(function, function), where the first > function is what happens when something is onmouseover and the second > is onmouseout. > > $(elem).hover( >

[jQuery] Re: .click to start dropdown, hover out to clear (mixing the two)

2009-02-17 Thread James
The syntax for hover() is hover(function, function), where the first function is what happens when something is onmouseover and the second is onmouseout. $(elem).hover( function() { // do something on mouseover }, function() { // do something on mouseout } )

[jQuery] Re: click events on links

2009-02-14 Thread Rick Faircloth
Saturday, February 14, 2009 9:39 PM > To: jQuery (English) > Subject: [jQuery] Re: click events on links > > > i've done this before just leaving out the href in the a tag. if you > aren't going to use it, you may as well not put it in. > > On Feb 14, 5:48 pm, int

[jQuery] Re: click events on links

2009-02-14 Thread pedalpete
i've done this before just leaving out the href in the a tag. if you aren't going to use it, you may as well not put it in. On Feb 14, 5:48 pm, introvert wrote: > Hello. > > I have a simple anchor href link on which I put on click event > handler: > > > $("#pause").click(function () { >     //d

[jQuery] Re: click/change events not recognized for checkboxes

2009-02-05 Thread James
Try: $("#mfglist input:checkbox") or maybe: $("#mfglist :checkbox") (note the space before :) might work. Using: $('#manufacturers:checkbox') is saying that you have a checkbox with the ID of manufacturers, which is incorrect. On Feb 5, 11:09 am, sdeo wrote: > Hi >   I have the following html

[jQuery] Re: CLick event for Select Box not supported by IE

2009-02-05 Thread James
I see. Yeah, select elements doesn't work like that. Though I found that "click" can work that way if you give the select element with a size attribute: So if you re-click a selected element, it'll fire. Does this option fit with your design? On Feb 4, 6:01 pm, Pedram wrote: > Thanks , great ,

[jQuery] Re: CLick event for Select Box not supported by IE

2009-02-04 Thread Pedram
Thanks , great , But consider the I want the user to Click in a Option which is selected right now and An event Fire Ups so Click dosen't work for IE and CHange doen't support it On Feb 4, 10:52 am, James wrote: > Change should work. > > $("select.actions").change(function(){ >      if ( $(this

[jQuery] Re: CLick event for Select Box not supported by IE

2009-02-04 Thread James
I've never had any issues with it on any common browsers, including IE6. On Feb 4, 4:05 pm, Pedram wrote: > Ow Great so $(this).val() returns the Option value , is this > acceptable by IE because , I think I had a Problem with that before . > > On Feb 4, 10:52 am, James wrote: > > > Change shou

[jQuery] Re: CLick event for Select Box not supported by IE

2009-02-04 Thread Pedram
Ow Great so $(this).val() returns the Option value , is this acceptable by IE because , I think I had a Problem with that before . On Feb 4, 10:52 am, James wrote: > Change should work. > > $("select.actions").change(function(){ >      if ( $(this).val() == 'NEW' ) alert('NEW was selected'); >  

[jQuery] Re: CLick event for Select Box not supported by IE

2009-02-04 Thread James
Change should work. $("select.actions").change(function(){ if ( $(this).val() == 'NEW' ) alert('NEW was selected'); else alert('NEW was not selected'); }); On Feb 4, 6:56 am, Pedram wrote: > Dear folk , >  I have a select box with Multiple Options > Such as below > >   New/Edit >   1

[jQuery] Re: Click Links in the Nnavigation Bar

2009-02-04 Thread Karl Swedberg
On Feb 4, 2009, at 1:09 AM, Pedram wrote: Thanks Karl , It helped me alot Not a problem. Glad to help. Since it's not possible in a valid DOM to have an A that is a descendant of a UL but not a descendant of an LI, the LI is superfluous. No need to do an extra getElementsByTagName there.

[jQuery] Re: click event

2009-02-04 Thread jQuery Lover
You can take advantage of event delegation by binding click event to the table tag and checking with "if" statement if the clicked cell is not the one that has a checkbox. For event delegation see: http://www.learningjquery.com/2008/03/working-with-events-part-1 For row checking and stuff see: h

[jQuery] Re: Click Links in the Nnavigation Bar

2009-02-03 Thread Pedram
Thanks Karl , It helped me alot On Feb 1, 9:47 am, Karl Swedberg wrote: > On Feb 1, 2009, at 3:06 AM, Pedram wrote: > > > > > I have another  tiny question > >  $("Ul li a"), $("ul a"), $("a",$("ul")) > > which one has the great performance !!? > > I would go with either $('ul a') or $('a', 'ul

[jQuery] Re: click Event not working on first binded element on IE after one click

2009-02-02 Thread shahku...@gmail.com
Using that doesn't work either. The first word, stops registering the click event after one click. The only way I found to resolve the issue is, add the following code to the page: Hidden In this case, Hidden becomes the "first word", so the rest of the page works with the click event. Thanks O

[jQuery] Re: click Event not working on first binded element on IE after one click

2009-02-01 Thread Ricardo Tomasi
It probably won't make any difference, but why not use the 'click' event and 'this'? There is no need to get e.target if there are no child elements. Also, if you're doing a POST, why are you using a querystring? $('.hint').click(function(){ var clickText = $(this).text(); $.post('term.

  1   2   3   >