Within your click function, this refers to the element that was clicked
(in this case, either #bridge1 or #bridge2). You can then get the
(immediate) children of that element that match the selector 'p' and toggle
that.
$('#bridge1,#bridge2').click(function(){
On Wed, Jul 29, 2009 at 4:23 PM, lukasanimod...@gmail.com wrote:
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.
$(this).children(p)
It only checks immediate
Thank you for your immediate response, Hector and Brett! I love the
jquery group!
$(div:not(#+pid+) form span).css(background-color,yellow);
On Jun 9, 8:19 am, squalli2008 m...@paskell.co.uk wrote:
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
You probably don't want the '#' character in there:
$(div:not(+pid+) form span).css(background-color,yellow);
On Jun 9, 11:45 am, mkmanning michaell...@gmail.com wrote:
$(div:not(#+pid+) form span).css(background-color,yellow);
On Jun 9, 8:19 am, squalli2008 m...@paskell.co.uk wrote:
Hi,
Yes you do, if you want to filter by ID. Unless the variable pid =
#some_id.
On Jun 9, 1:29 pm, Danny d.wac...@prodigy.net wrote:
You probably don't want the '#' character in there:
$(div:not(+pid+) form span).css(background-color,yellow);
On Jun 9, 11:45 am, mkmanning michaell...@gmail.com
Hi, I have the following html and would like to find out how to select
#subgroup under #group2. I tried $(#group2 #subgroup) but that didn't
seem to work. Thank you.
div id=main
div id=group1
div id=subgroup
...
/div
/div
div id=group2
div id=subgroup
...
/div
Hi there i want to get all select elements on a page with name=test
[1],name=test[2]...
is there a way to specify a placeholder in the selector?
i think about
$('select[name=id[*]]').each(function(){
alert($(this).html())
});
is there any possibility for that?
thanks for your replies
On Jan 15, 2009, at 1:06 PM, John wrote:
This has probably been asked several times on the list but I'm having
trouble finding a resolution.
Yes. In fact, it has been asked frequently. :)
If you are using 1.3 it might be related to this:
http://dev.jquery.com/ticket/3848
Anyway, if you select by ID then you don't need any other selectors as
IDs are unique.
On Jan 15, 7:06 pm, John li...@johndubchak.com wrote:
This has probably been asked several times on the list but I'm having
I'm using jQuery 1.2.6 and having an a element with the attribute
ajax:id=46
a href=# ajax:id=46Test Link/a
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
Got it. Thanks Mike. So this code would have made better sense:
$(button:first).click(function(event){alert(this);})
On Jan 13, 5:52 pm, Michael Geary m...@mg.to wrote:
Do you have Firebug? If not, get it and enable the Console and Script tabs,
then enter these statements into the console
Do you have Firebug? If not, get it and enable the Console and Script tabs,
then enter these statements into the console input line, one at a time with
Enter after each one:
$(button)
$(button)[0]
$( $(button)[0] )
Each one will log an object to the console log. Click on each of these
objects
nevermind, found it!
var thisMenuLevelInt = $thisA.parents('ul').length;
On 30 déc, 17:22, Alexandre Plennevaux aplennev...@gmail.com
wrote:
hello mates,
i have a multiple level dropdown menu, the markup is an unordered list
of the likes:
ul
lia href=#me/a
ullia
If you don't want to manipulate the td's themselves, then you have
to have the content of the td's wrapped in some sort of object so
that you can show/hide it... something your example HTML doesn't have
On Dec 4, 12:56 pm, clorentzen [EMAIL PROTECTED] wrote:
Hi --
I'm trying to hide all the
On Thu, Dec 4, 2008 at 9:56 AM, clorentzen [EMAIL PROTECTED] wrote:
I'm trying to hide all the contents from tds within a table *except*
for the first td in each tr... I don't want to hide the tds,
just their contents, but I'm having trouble finding the correct
selector(s) to accomplish
On Thu, Dec 4, 2008 at 10:28 AM, Charlie Griefer
[EMAIL PROTECTED]wrote:
On Thu, Dec 4, 2008 at 9:56 AM, clorentzen [EMAIL PROTECTED]wrote:
I'm trying to hide all the contents from tds within a table *except*
for the first td in each tr... I don't want to hide the tds,
just their contents,
Thanks! The lack of something else wrapping each tds content was
indeed the problem.
On Dec 4, 1:34 pm, Charlie Griefer [EMAIL PROTECTED]
wrote:
On Thu, Dec 4, 2008 at 10:28 AM, Charlie Griefer
[EMAIL PROTECTED]wrote:
On Thu, Dec 4, 2008 at 9:56 AM, clorentzen [EMAIL PROTECTED]wrote:
If I have the following:
var pError = $('p.error');
Then I can do the following with no problem:
pError.text('lorem);
Yet, I want to check for the paragraphs that have the class error
that are visible, I would think it is something like this:
var visibleError = $(':visible', pError);
How can I select all text inputs that have an ID that end in date?
Thanks
Scott.
hello,
I'm wondering if there is such a thing as:
$(div).hover(
function(){
$(this.p).show();
},
function(){
$(this.p).hide();
}
);
I know the above code is useless because of the use of this but I
wonder if there's a selector
One thing that I've noticed is that the expr attribute is pretty
inconsistent across methods (such as filter, find, parents, parent, etc.)
The documentation is very vague about what an expression is, other than it
just being a selector. However I would assume a valid expression for one
element
Hey guys,
Wanted to make sure I am getting the correct returned elements.
Assume I have a table like:
table cellpadding=3 cellspacing=0 border=1 width=100%
tbody
tr
tdCell 1/td
tdCell 2/td
tdCell 3/td
Hi, I am trying to implement ifixpng for all elements that have a .png
as the background image.
Is there a way to grab these (and only these) with one nicely written
selector?
Thanks,
Jeremy
Glad I could help :)
On 8/24/07, Pops [EMAIL PROTECTED] wrote:
That did it! Thanks Joan!
--
HLS
On Aug 24, 12:51 am, Joan Piedra [EMAIL PROTECTED] wrote:
Hey Pops,
I have not tested this, but should work. Just use the next node.
$('legend').click(function(){
Hey Pops,
I have not tested this, but should work. Just use the next node.
$('legend').click(function(){
$(this).next().fadeOut(250);
});
On 8/24/07, Pops [EMAIL PROTECTED] wrote:
I have HTML like so with a bunch of fieldset tags:
fieldsetlegend[ Title1 ]/legenddiv id='wc1'/div/fieldset
On Aug 16, 2007, at 4:01 AM, Wizzud wrote:
Your 'jQuery_How_Do_I_not.html' IS working.
If you were to change one of the #ee colours to some completely
different colour you would be able to see the effect of clicking on
div1.
However, when you click on div2 both click handlers are invoked
Awesome! I got it working and improved it:
http://www.whatbird.com/wwwroot/Components/jQuery_How_Do_I_not3.html
You can now see clicking any div other then div2 unfocuses div2 while
clicking on div2 gives it focus again.
And they said it could not be done!
Thanks for the help.
Mitch
PS Karl
Mike Alsup wrote:
You need to add the '#' for id selection.
$(div :not('#myID'));
Mike
Mike, I'm not so sure about the white space before the colon,
theoretically div :not(#myId) would select all children of div that do
not have that particular id?
--Klaus
Mitch wrote:
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
Try
You need to add the '#' for id selection.
$(div :not('#myID'));
Mike
On 8/15/07, Mitch [EMAIL PROTECTED] wrote:
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
On 8/15/07, Mitch [EMAIL PROTECTED] wrote:
Does anyone have a way to select
all divs except one with a specific ID?
On Aug 15, 2007, at 3:52 PM, Mike Alsup wrote:
You need to add the '#' for id selection.
$(div :not('#myID'));
And you need to close the space between div and :not
Yeah, your selector should be:
$(div:not(#myID))
--John
On 8/15/07, Mitch [EMAIL PROTECTED] wrote:
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
Oops. Thanks for catching that! (You too, Karl)
On 8/15/07, Klaus Hartl [EMAIL PROTECTED] wrote:
Mike Alsup wrote:
You need to add the '#' for id selection.
$(div :not('#myID'));
Mike
Mike, I'm not so sure about the white space before the colon,
theoretically div :not(#myId)
I news for all of you, none of these suggestions work. Here is my code
you can run it and see. When I add the last click handler it breaks
the 2nd one and nothing happens. My guess is that is still not the
right selector.
!DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN http://
35 matches
Mail list logo