[jQuery] Selector question

2009-07-29 Thread lukas
How can I pick an id element (here #bridge1,#bridge2) and toggle its child (here a p element) without actually using the id element as parent? 'this > p' apparently does not work. $('#bridge1,#bridge2').click(function(){ $('this > p').toggle(); return false; }); Thanks for your h

[jQuery] selector question

2009-06-09 Thread squalli2008
Hi, Im trying to select all spans in divs containing forms that dont have a certain id $("div:not([id='#'+pid]) form span").css("background-color", "yellow"); This selects all spans regardless of the ID.. Any suggestions would be great! Thanks in advance...

[jQuery] Selector Question from a newb

2009-01-15 Thread John
This has probably been asked several times on the list but I'm having trouble finding a resolution. I have a simple problem where I dynamically add html to a div when the user clicks a link based on an event handler, which works fine. However, I am further trying to bind events to a couple of but

[jQuery] Re: jQuery selector question - Having ":" in attribute name

2009-01-14 Thread Balazs Endresz
Just investigated it: http://dev.jquery.com/ticket/3729 The colon is valid I think, but it's true, there are some restrictions. On Jan 14, 2:27 pm, naden wrote: > That sucks. jQuery has no problem with $( 'a' ).attr( 'ajax:id' ); > Therefore it would be nice to use it in the selector too. > > t

[jQuery] Re: jQuery selector question - Having ":" in attribute name

2009-01-14 Thread naden
That sucks. jQuery has no problem with $( 'a' ).attr( 'ajax:id' ); Therefore it would be nice to use it in the selector too. thanks anyway have to change it. On 14 Jan., 14:05, "jQuery Lover" wrote: > Slightly :) > > You can not have special character in your html ATTRIBUTES. > > You should ren

[jQuery] Re: jQuery selector question - Having ":" in attribute name

2009-01-14 Thread jQuery Lover
Slightly :) You can not have special character in your html ATTRIBUTES. You should rename "ajax:id" to something else. Ex: ajax_id or ajaxId. - Read jQuery HowTo Resource - http://jquery-howto.blogspot.com On Wed, Jan 14, 2009 at 5:16 PM, naden wrote: > > Your right. The docs

[jQuery] Re: jQuery selector question - Having ":" in attribute name

2009-01-14 Thread naden
Your right. The docs said: "Note: if you wish to use any of the meta-characters described above as a literal part of a name, you must escape the character with two backslashes (\). For example: #foo\\:bar #foo\\[bar\\] #foo\\.bar" and so I did. I used \\: to escape the ":" or I'm gettin you wr

[jQuery] Re: jQuery selector question - Having ":" in attribute name

2009-01-14 Thread jQuery Lover
You can not have special character in attribute names. (it's not valid markup) Documentation is saying that your should escape VALUE bit if it contains special characters. - Read jQuery HowTo Resource - http://jquery-howto.blogspot.com On Wed, Jan 14, 2009 at 2:11 PM, naden wro

[jQuery] jQuery selector question - Having ":" in attribute name

2009-01-14 Thread naden
I'm using jQuery 1.2.6 and having an element with the attribute ajax:id="46" Test Link According to http://docs.jquery.com/Selectors/attributeEquals#attributevalue you have to escape ":" with double backslash like I did. alert( $( "a[ajax\\:id='46']" ).attr( 'href' ) ); I tried a lot, but it'

[jQuery] Selector Question

2009-01-13 Thread bittermonkey
I'm fairly new to the framework and I've been messing around a bit. These below confuses me. 1. Why is this snippet not working? Firefox's error console throws an error saying < $("button")[0].bind is not a function > $("button")[0].bind("click", function(event){alert(this)}); 2. And why do

[jQuery] Selector Question

2009-01-13 Thread bittermonkey
Why does this work? $($("button")[0]).bind("click", function(event){return AlertOnClick (this + " not " + $("button")[0]);}); And why does this DOESN'T? $("button")[0].bind("click", function(event){return AlertOnClick(this + " not " + $("button")[0]);});

[jQuery] selector question: how many ul above $(this) ?

2008-12-30 Thread Alexandre Plennevaux
hello mates, i have a multiple level dropdown menu, the markup is an unordered list of the likes: me me me me me me

[jQuery] selector question

2008-12-04 Thread clorentzen
Hi -- I'm trying to hide all the contents from s within a table *except* for the first in each ... I don't want to hide the s, just their contents, but I'm having trouble finding the correct selector(s) to accomplish this. So, for example, if the table is: one two three four five six I'

[jQuery] Selector Question

2007-08-23 Thread Pops
I have HTML like so with a bunch of tags: [ Title1 ] [ Title2 ] .. [ Titlen ] These fade in and out and I had this for the fade out: $('[EMAIL PROTECTED]').click( function() { $(this).text("").fadeOut(250); }); But I don't want to click the div container to fade out, but rather the lege

[jQuery] Selector Question should be easy (continued with online example)

2007-08-15 Thread Mitch
This doesnt work http://www.whatbird.com/wwwroot/Components/jQuery_How_Do_I_not.html This works http://www.whatbird.com/wwwroot/Components/jQuery_How_Do_I_not2.html The first example uses John's example for using not. Klaus your's didnt work either. Is this my stupidity again? Mitch

[jQuery] Selector question should be easy

2007-08-15 Thread Mitch
Does anyone have a way to select "all divs except one with a specific ID?" I want something like $(* :not("myID")).click or $(div :not("myID")).click I have tried :not but have not been able to get it to work on IDs, seems that it just works on elements. thanks Mitch