Hey,
If you are trying to get the parent of the 'close' button and fade
that out, just use one of the following:
closest( expr )
parent( [expr] )
$(document).bind("click", function (e) {
$(e.target).closest("li").toggleClass("hilight"); // will
traverse the clicked element returning the fi
Brian:
Thank you *so* much for your help with this!
I found that I could even do:
$('#selected_courses input:radio:checked[name="' + curr_ordinal +
'"]')
I'm skeptical about your explanation of the value for checked because:
1) in Firebug's DOM inspector the value shown for the Javascript
pr
The .live() method uses event delegation under the hood. doing this:
$('a').live('click', function() {
// do something
});
is like doing this:
$(document).bind('click', function(event) {
if ($(event.target).closest('a').length) {
// do something
}
});
except that with .live() the sel
> Nah. Using .live() wires up one event handler to document.
>
> --Karl
Doh, shame on me for my lack of facts on that ".live()"... i'll read
up on it some, as i usually, well always, take the delegation
route..
Well I dont think I'll have more than about 15 childs here.
Thx for help
On 4 déc, 17:09, MorningZ wrote:
> I wouldn't suggest going the ".live" route if you plan on having a lot
> of children of "cat_list"
>
> using event delegation, there is one single event wired up that
> handles 1 child
On Dec 4, 2009, at 11:09 AM, MorningZ wrote:
I wouldn't suggest going the ".live" route if you plan on having a lot
of children of "cat_list"
using event delegation, there is one single event wired up that
handles 1 child or 1200 children
using ".live", you would have N number of events s
I wouldn't suggest going the ".live" route if you plan on having a lot
of children of "cat_list"
using event delegation, there is one single event wired up that
handles 1 child or 1200 children
using ".live", you would have N number of events sitting there wired
up where N is the number of ch
Well, after a few tests, this works fine :
$("#cat_list > div").live("click", function()
{ alert($(this).attr("id"));
});
thanx
Is your issue description linked to this :
http://forum.jquery.com/viewtopic.php?f=2&t=1000&sid=7932d86732f0126e2c4ad3f5e92baa4d
Same thing ?
On Dec 3, 10:52 pm, MorningZ wrote:
> if those 's are dynamically added, which it sounds like is the
> case, then the "new" 's do not get wired automati
I'll test it tomorrow.
Thx for answer
if those 's are dynamically added, which it sounds like is the
case, then the "new" 's do not get wired automatically... <-
this is easily the most common trip-up seen on this mailing list
Event Delegation would be your friend here
http://jsbin.com/ivivo/edit
that way the container event "cat_
Well, actually my div "39", "40", are returned in the cat_list
div from a previous ajax query. Numbers are in fact the autoincrement
id's in a mysql table.
Point is, on clicking each, to edit it.
That specific javascript part is returned by that ajax query.
the first one works perfectly fine in stripped down form
http://jsbin.com/epoju/edit
must be something else with other code you are doing
On Dec 3, 10:03 am, Civette wrote:
> Well i'm in trouble.
>
> Following code does not trigger :
>
> Code: Select all
> $("#cat_list > div").click(functi
I'm relative new to jQuery, but I usually use "function(e)" instead of
"function()" within a "click" handlers, because when you do it on a
selector that do not return a single element ("#cat_list > div"
returns several dom element) you cannot access the data you need
(e.target is the element you cl
On Nov 12, 6:11 am, Karl Swedberg wrote:
> Are those tests really using jQuery 1.1.4? If so, they're hardly
> relevant now, unless you're using a very old version of jQuery.
The "tests" are relevant in the context of the article. The point is
really about improving performance by not making c
Are those tests really using jQuery 1.1.4? If so, they're hardly
relevant now, unless you're using a very old version of jQuery.
--Karl
Karl Swedberg
www.englishrules.com
www.learningjquery.com
On Nov 11, 2009, at 7:23 AM, grabnerandi wrote:
Check out this link:
http://blog
Check out this link:
http://blog.dynatrace.com/2009/11/09/101-on-jquery-selector-performance/
Is changing the name values a possibility?
You're doing nothing but asking for trouble (overly complicated
selector syntax and poor performance) with your current naming
convention
On Sep 29, 9:14 am, loicg wrote:
> Hi,
>
> I want all my form inputs which name start with "fieldInstanceGroups
>
After you have bound your keyup action you can add another triggering
event like so:
$('#Query').bind('change', function(){
$(this).trigger('keyup');
})
On Sep 9, 3:36 pm, "Dave Maharaj :: WidePixels.com"
wrote:
> I have a simple form field that runs a query.
>
> I have
>
> $('#Query').bind('
NAME is not valid attribute of , so it's possible you can expect
some inconsistencies.
I suggest changing it to using ID instead (remember, IDs cannot begin
with a number also, so you'll have to prepend it with something).
Other suggestions are using jQuery's data() functions:
http://docs.jquery.
Thank you for your immediate response, Hector and Brett! I love the
jquery group!
On Wed, Jul 29, 2009 at 4:23 PM, lukas 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 children (as wi
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(){
$(this).children('p').toggle
From: iceangel89
To: "jQuery (English)"
Date: 07/24/2009 09:24 AM
sorry the code is
Link 1
Link 2
Link 2.1
Link 2.2
On Jul 24, 9:20 pm, iceangel89 wrote:
> with the markup like:
>
>
this is an object name, you want to pass the object itself and not a
string, as others have already said:
$(this).find('+ h1')
or
$('+ h1', this)
or
$(this).next('h1')
http://docs.jquery.com/Selectors
On Jul 19, 4:46 am, Dhruva Sagar wrote:
> Hi,
>
> Perhaps your missing a space? $('this h1'),
Hi,
Perhaps your missing a space? $('this h1'), or $('this ' + 'h1')
What I don't understand is, why are you trying to concatenate two
strings when you don't need to?
Thanks & Regards,
Dhruva Sagar.
On Sat, 2009-07-18 at
absolutely right, and I know better, was far too late at night...thanks
for the catch
Shawn wrote:
that would still fail - unless he has a tag named "this" just like
doing $("a") finds anchor tags. If however he is using "this" in terms
of an event handler (where "this" is a reference to
that would still fail - unless he has a tag named "this" just like
doing $("a") finds anchor tags. If however he is using "this" in terms
of an event handler (where "this" is a reference to the DOM object that
threw the event, then he would need to remove the quotes:
$(this).siblings('h1')
you can't use "this" in same manner as tagnames, ID's or class as a
selector in combination with other selectors the way you are
attempting.
try:
h1Height = $('this').siblings('h1').height();
Warfang wrote:
I'm pretty new to _javascript_/ jQuery, so this is really bugging me.
I'm tr
Selectors are strings, including the special operators. So your select
should look like this:
'this + h1'. What you have there just concatenates the two strings
together making your selector 'thish1'
cheers
Michael Lawson
Development Lead, Global Solutions, ibm.com
Phone: 1-276-206-8393
I run a local test with your code here and it works fine!
Maurício
-Mensagem Original-
De: Shane Riley
Para: jQuery (English)
Enviada em: quinta-feira, 2 de julho de 2009 13:12
Assunto: [jQuery] Selector :eq(x) issuing warning in FF
When calling this jQuery:
$("#homepag
Answering my own question.
Missed the optional 'context' parameter on the basic jQuery command.
Works as advertised/expected.
On Jul 2, 6:39 am, NauticalMac wrote:
> Starting to use jQuery having read 'jQuery in Action'.
> Came across the following sysntax for sortable tables:
> $('table.sort
I've been around jQuery for about 6 months and only learned that
syntax recently. You won't find it documented very many places,
perhaps it's an older style that got phased out for more aesthetic
chaining. It is in jQuery core and it does work
NauticalMac wrote:
Starting to use jQuery ha
ok, go to http://www.hypertextwebdesign.com/admin,
click the button that shows up (placeholder for login form)
Click on Galleries on the menu on the left
What shows next is the main galleries page. Here the client can sort the
galleries how they want them to be sorted on their website, delete
What exactly are you trying to achieve? It's hard to deduce anything
from lots of .prev() and .next() calls without seeing the
corresponding HTML mark-up. What inner DIV? What container?
Moving a single row up should be as simple as $row.insertBefore
( $row.prev() ); http://snipt.org/kkpo
On Jun
This code seems to work great in FF and Safari, but IE seems to interact
with it differently.
[code]
$('a.moveup').click(function(event) {
var href = $(this).attr('href');
$.get(href);
var $thisRow = $(this).parents('tr:first');
var $thisTable = $('#main_table');
Hi
just want to share my piece of code for getting out values of rows/
cells.
$('#myTableID tr:gt(1)').each(function(){
$(this).find('td').each(function(){
// get the cell text out with $.trim($(this).text());
});
});
hope that helps
Gerald
On Jun 17, 7:08 pm, theprodigy
I think I have it working now. It does what it's supposed to, but
doesn't really seem to me that it would be all the effecient, should a
table have lots of rows (unlikely, but may happen).
Here is my code:
$('a.moveup').click(function(event) {
//Send request to server
var href
On Jun 17, 3:46 am, theprodigy wrote:
> I've been trying for a while to alter the second to last row of a
> table. I've tried several ways. The number of rows is dynamic so I
> can't hard code a number into nth-child. I used $rowNeeded =
> $thisRow.parents('table:first').children().children().l
ok, I'm having a really tough time with this.
here's a part of my code (most of this Thanks to Karl, part thanks to
mkmanning, very little thanks to me, lol):
$('a.moveup').click(function(event) {
var $thisRow = $(this).parents('tr:first');
var $thisTable = $('#main_table');
A couple quick examples that might help (there're many more ways):
console.log( $('table tr:last').prev() );
var trow = $('table tr');
console.log( $(trow[trow.length-2]) );
console.log( trow.eq(trow.length-2) );
Modify the selectors as needed for multiple/nested tables.
HTH
On Jun 16, 10:46
Hi, no responses to this, so thought I'd reply to put it in front of
people again. Perhaps an item for the jquery dev list?
thanks,
-Morgan
On Jun 10, 4:57 pm, morgancodes wrote:
> Hello,
>
> I'm getting inconsistant results across browsers with the following
> test:
>
> test.html =
Yes you do, if you want to filter by ID. Unless the variable pid =
"#some_id".
On Jun 9, 1:29 pm, Danny 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 wrote:
>
>
>
> > $("div:not(
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 wrote:
> $("div:not(#"+pid+") form span").css("background-color","yellow");
>
> On Jun 9, 8:19 am, squalli2008 wrote:
>
> > Hi,
>
> > Im trying to
$("div:not(#"+pid+") form span").css("background-color","yellow");
On Jun 9, 8:19 am, squalli2008 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 selec
$('a[class^="edit_"]:not(.' + e + ')').fadeTo('slow' , 0.25 , function() {
...
}
Maurício
-Mensagem Original-
De: Dave Maharaj :: WidePixels.com
Para: jquery-en@googlegroups.com
Enviada em: quinta-feira, 4 de junho de 2009 21:43
Assunto: [jQuery] Selector not question
I am
-Mensagem Original-
De: Dave Maharaj :: WidePixels.com
Para: jquery-en@googlegroups.com
Enviada em: quinta-feira, 4 de junho de 2009 21:43
Assunto: [jQuery] Selector not question
I am trying to disable all links except for the one clicked.
$('a[class^="edit_"]').click(f
invalid code
Dave Maharaj :: WidePixels.com wrote:
I am cleaning up some html code and
originally i had
Profile Settings
echo $preference['name'] . ', ';
endforeach; ?>
but the DIV inside the LI was too much so I
Unrelated to your issue, I would consider an effects queue.
Just sayin'
On Thu, 4 Jun 2009 15:17:24 -0230, "Dave Maharaj :: WidePixels.com"
wrote:
> I am cleaning up some html code and originally i had
>
>
>
>
> Profile Settings
>
>echo $preference['nam
t can be caused by
just such a closure.
JK
-Original Message-
From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
Behalf Of MorningZ
Sent: Tuesday, April 28, 2009 7:35 PM
To: jQuery (English)
Subject: [jQuery] Re: Selector help needed
You'll have to build up the
You'll have to build up the selector as a string when you call
"setTimeout", that function is run out of the context of being within
that .each statement
so you'll have to do something like (and there's many ways of doing
this, i'll just show quick and easy), and yeah, the 's will have to
ha
On Apr 16, 2009, at 8:26 AM, Dragon-Fly999 wrote:
Instead of using "$(this).parent().parent().find(':checkbox')", is
there a way to select using the following rule:
Go up the hierarchy (regardless of how many parents there are) until
the first is found, then give me a list of all the checkbox
I didn't know about the closest method and I could use it in my case.
Thank you.
On Apr 16, 8:33 am, Leonardo K wrote:
> Maybe is easier if you put a class (wrapper) in your div that wrap all other
> divs, and then you could use:
>
> $(this).closest('div.wrapper').find(":checkbox");
>
> and
>
>
Maybe is easier if you put a class (wrapper) in your div that wrap all other
divs, and then you could use:
$(this).closest('div.wrapper').find(":checkbox");
and
$(this).closest('div.wrapper').prev();
On Thu, Apr 16, 2009 at 09:26, Dragon-Fly999 wrote:
>
> Thanks, Karl. Your suggestions work f
Thanks, Karl. Your suggestions work fine. I just started using
JQuery and found the selectors very powerful. I was wondering if the
selectors that you suggested can be less dependent on the number of
divs in that section of the HTML.
Instead of using "$(this).parent().parent().find(':checkbox'
On Apr 15, 2009, at 6:24 PM, Dragon-Fly999 wrote:
Hi, I have a couple of questions about selectors. I have the
following HTML:
=
Some elements and elements here.
...
...
Information Type 1
First
Middle
Last
...
...
More elements and elements here.
=
Q
Hi Stephan,
Interesting. You're also right that I could separate out the layerType
check. I'm using a OCG WMS to fetch a small block of KML objects
surrounding a point (geoserver WMS with KML output). In response to a user
query, I loop through the collection checking if the query coord is insid
Hi Josh,
it looks like $foo.find(":header") has a problem since there is no
single root element. Wrapping your data packet into would help:
$foo = $(""+foo+"");
but since you are after a speed optimization I would suggest:
layerType = $(queryTarget[0]).text();
This gets the text of your fir
Hi Stephen,
My apologies for not getting back to you sooner. I've been sick and my
projects have gotten away from me.
We now return to the email I'd started writing before I lost track of
everything.
Thank you! Trebly so!
First, yes, the data is ordered based on a template in geoserver th
There must be something else wrong in your page. The HTML and
selectors you gave work fine (see http://jquery.nodnod.net/cases/175).
Can you put a complete sample page online?
- ricardo
On Feb 25, 8:52 pm, RadicalBender wrote:
> The rows are created on the fly, they aren't actually empty. Here
The rows are created on the fly, they aren't actually empty. Here's a
simplified version of what the table looks like:
ArtistSong
There are no songs yet.
Artist NameSong
Title
Artist NameSong
Title
Artist NameSong
Title
As you can see, there's a header row, then the NoSongs row, then all
of
Hi RadicalBender,
How about use the $('tr td:empty') selector to target the empties rows?
Not solve?
So,
need some more information to try figure out a solution.
Are there tbody, tfoot and thead in your table?
Where is located the tr#NoSongs?
Would you please show a simplified sample of the ta
Hi Josh,
are your data ordered? (e.g. MAP_ID is the first , SITE_ADDRESS
the second, ...)
If yes you can use a index based approach (from 4.8ms to 0.9ms on IE).
var $foo = $(foo);
var data = $foo.find(".atr-value");
var parcelOutput = 'Parcel ID: ' +
$(data[0]).text() +
'' +
Your test case is not comparing a raw implementation
You are still using jQuery $ inside the loop, it should be pure
document.getElementById("test");
When you remove the $ from your test case and use native
implementation you will be getting numbers in the following range:
FF
ID Raw: 1 ID jQuer
On Feb 17, 4:22 pm, SteelRing wrote:
> I would love to get to the bottom of all these and figure out cases of
> "recommended" and "bad" uses of jquery selector. I came across jquery
> a couple months ago and got excited with how easy it is to use this
> framework rather than doing getElementFro
I would love to get to the bottom of all these and figure out cases of
"recommended" and "bad" uses of jquery selector. I came across jquery
a couple months ago and got excited with how easy it is to use this
framework rather than doing getElementFromMyAss all over the page,
typing that long synta
On Feb 17, 2:43 am, John Resig wrote:
> On Mon, Feb 16, 2009 at 8:28 AM, RobG wrote:
>
> > On Feb 16, 5:30 pm, SteelRing wrote:
> >> This may sound stupid to y'all jquery practitioners, but i wonder
> >> which method is fastest (recommended) for selecting a cell with a
> >> class in a big ta
Umm - that's not true at all.
I created a test for you to see:
http://dev.jquery.com/~john/ticket/class-speed/
In Firefox 3 I'm getting:
ID Raw: 9 ID jQuery: 22 (over 500 queries)
Class Raw: 1108 Class jQuery: 778 (over 100 queries)
In Safari 3.2 I'm getting:
ID Raw: 1 ID jQuery: 3 (over 500 qu
Not going to native methods I'd say the fastest selector without an ID
would be $("#tableid td.cellclass") as that will call getElementByID
and getElementsByTagName/getElementsByClassName from the #tableid
context (or querySelectorAll). Anyway, you only need to add more
selectors if you want to en
On Feb 16, 5:30 pm, SteelRing wrote:
> This may sound stupid to y'all jquery practitioners, but i wonder
> which method is fastest (recommended) for selecting a cell with a
> class in a big table (think like 1000+ rows 100+ columns):
Fastest: the browser-native getElementsByClassName (recent
I'd say go for just ("#uniqueid") as that likely maps to
document.getElementById() (fast) and bypasses the normal jquery
traversing that is required if you put in more selectors.
SteelRing wrote:
This may sound stupid to y'all jquery practitioners, but i wonder
which method is fastest (recom
rowIndex is a DOM property, so you'd have to use alert(trow
[0].rowIndex);
On Feb 10, 10:19 am, pantagruel wrote:
> > rowsBefore = row.rowIndex;
>
> Ok, but jQuery("#activator" + input).parent().parent(); selects the
> row, but when I try to get rowIndex of that selected row I get
> undefined b
Try:
alert( trow.get(0).rowIndex );
On Feb 10, 8:19 am, pantagruel wrote:
> > rowsBefore = row.rowIndex;
>
> Ok, but jQuery("#activator" + input).parent().parent(); selects the
> row, but when I try to get rowIndex of that selected row I get
> undefined back.
>
> var trow = jQuery("#activator"
>
> rowsBefore = row.rowIndex;
Ok, but jQuery("#activator" + input).parent().parent(); selects the
row, but when I try to get rowIndex of that selected row I get
undefined back.
var trow = jQuery("#activator" + input).parent().parent();
alert(trow.attr("class")); // the class of my row
alert(
Great discussion. Thanks for all.
-- Nivash Ramachandran
On Mon, Feb 9, 2009 at 7:19 PM, Karl Swedberg wrote:
> Oh yeah! Good point, Rob. I always forget these DOM properties. Thanks for
> the reminder. :)
>
> --Karl
>
>
> Karl Swedberg
> www.englishrules.com
> www.learningjquery.co
Oh yeah! Good point, Rob. I always forget these DOM properties. Thanks
for the reminder. :)
--Karl
Karl Swedberg
www.englishrules.com
www.learningjquery.com
On Feb 9, 2009, at 2:37 AM, RobG wrote:
On Feb 9, 4:23 am, pantagruel wrote:
Hi,
I am selecting the row of a tab
On Feb 9, 4:23 am, pantagruel wrote:
> Hi,
>
> I am selecting the row of a table. I would like to be able to count
> how many rows there are in the table before the row I just selected. i
> suppose there is a jQuery selector that will do this.
Not necessary - table rows have a rowIndex propert
Oops. Sorry, I didn't see Ricardo's reply before posting. In any case,
there's no need to filter the .prevAll() with 'tr', since no other
element is allowed as a sibling of a tr.
--Karl
Karl Swedberg
www.englishrules.com
www.learningjquery.com
On Feb 8, 2009, at 6:06 PM, Kar
You could use prevAll()
$('#myrow').prevAll().length;
--Karl
Karl Swedberg
www.englishrules.com
www.learningjquery.com
On Feb 8, 2009, at 2:30 PM, James wrote:
I did a search but I could only find a selector that selected "after"
something:
http://docs.jquery.com/Selectors/s
you should be looking at http://docs.jquery.com/Traversing
var currentRow = $('table tr').eq(7);
var howManyBefore = currentRow.prevAll('tr').length;
cheers,
- ricardo
On Feb 8, 3:23 pm, pantagruel wrote:
> Hi,
>
> I am selecting the row of a table. I would like to be able to count
> how many
I did a search but I could only find a selector that selected "after"
something:
http://docs.jquery.com/Selectors/siblings#prevsiblings
can help.
Maybe you can get the total rows count, subtract from the count from
prev ~ siblings (and probably subtract 1 also).
I hope that helps somewhat.
On Fe
Oops, I misread. You wanted the count "before" the one you selected.
Please disregard my response!
On Feb 8, 9:22 am, James wrote:
> Assuming "row" means the number of ,
> and your tables looks like:
>
> data
> data
> data
> data
> data
>
>
> you can do something like
Assuming "row" means the number of ,
and your tables looks like:
data
data
data
data
data
you can do something like:
var count = $("table tr").length;
http://docs.jquery.com/Core/length
On Feb 8, 8:23 am, pantagruel wrote:
> Hi,
>
> I am selecting the row of a table
pantagruel schrieb:
try this:
My code is the following fragment:
var currentelement = jQuery("#" + activecolid);
var selectedcontent = jQuery("#" + activecolid).find
("div.contentdisplay").css({border: "10px solid #699000"});
alert(currentelement.html());
alert(selectedcontent.html());
Karl,
My solution appears to be along the line of:
var elem = getdocument...
$(elem).children() ...
I hadn't realized that I can pass a DOM element as a selector.
Thanks,
Chris
How about .children() ?
For example:
$('tr').children()
That, and much, much more, can be found at http://docs.jquery.com/Selectors
--Karl
Karl Swedberg
www.englishrules.com
www.learningjquery.com
On Jan 24, 2009, at 5:20 PM, ChrisA wrote:
I need to run thru a table and
Sweet. Thanks, Kean!!
On Jan 18, 4:23 pm, Kean wrote:
> This works and will take care of unchecked conditions too.
>
> $('table tr[id^=row] :checkbox').click(function(){
> $$ = $(this);
> $text = $$.parent().parent().find('.email, .contact');
>
> if($$.is(':checked')) {
>
Thank you.
This is exactly what I search.
10 Points :)
On Jan 19, 4:45 am, Ricardo Tomasi wrote:
> The only alternative is
>
> $(selector).next().andSelf()
>
> On Jan 19, 12:08 am, Ami wrote:
>
> > Hello,
>
> > Sorry about my grammar, English isn't my tang.
>
> > How I add to $ the next elmem
The only alternative is
$(selector).next().andSelf()
On Jan 19, 12:08 am, Ami wrote:
> Hello,
>
> Sorry about my grammar, English isn't my tang.
>
> How I add to $ the next elmement.
>
> Some think Like
>
> I can do:
> $(selector).add( $(selector).next)
>
> But I think that there is a better so
Oops, $checkbox.val(''); should be $text.val('');
On Jan 18, 1:23 pm, Kean wrote:
> This works and will take care of unchecked conditions too.
>
> $('table tr[id^=row] :checkbox').click(function(){
> $$ = $(this);
> $text = $$.parent().parent().find('.email, .contact');
>
>
This works and will take care of unchecked conditions too.
$('table tr[id^=row] :checkbox').click(function(){
$$ = $(this);
$text = $$.parent().parent().find('.email, .contact');
if($$.is(':checked')) {
$text[0].value = 'Email Checked';
$te
This is untested and just off the top of my head
$("table tr[id^='row']").each(function () {
$(this).find("td checkbox").click(function() {
if ($(this).is(":checked") == true) {
var $row = $(this).parent().parent(); //first is
, second is
$row
What version of jQuery are you using?
--John
On Fri, Jan 16, 2009 at 2:35 AM, floyd wrote:
>
> Hi all,
> Here is my situation.
>
> HTML Page DTD Type is declared as following
>
> http://www.w3.org/
> TR/xhtml11/DTD/xhtml11.dtd">
>
> Javascript Code as following
>
> $("#fp > option[text*='"+su
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 wrote:
> This has probably been asked several times on the list but I'm having
> trouble finding a
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. :)
http://docs.jquery.com/Frequently_Asked_Questions#Why_doesn.27t_an_event_work_on_a_new_element_I.27ve_cre
I use this sometimes to have all outside links open in a new tab/window.
$('a[href^="http"]')
.not('[href*=' + window.location.hostname + ']')
.attr('target', '_new');
You could modify that:
$('a[href^="http"]')
.not('[href*=' + window.location.hostname + ']')
.e
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" wrote:
> Do you have Firebug? If not, get it and enable the Console and Script tabs,
> then enter these statements into the console input
I need to capture all links that navigate away from the current page.
If a link points back to the current page, it is allowed to go
through. If it navigates away, a popup needs to appear displaying
certain information. I have two different strings that point pack to
the current page. One is a
Duplicate.
See:
http://groups.google.com/group/jquery-en/browse_thread/thread/e47ce13098a16ef/606e652153c624a2#606e652153c624a2
-
Read jQuery HowTo Resource - http://jquery-howto.blogspot.com
On Wed, Jan 14, 2009 at 3:32 PM, naden wrote:
>
> I'm using jQuery 1.2.6 and having a
1 - 100 of 281 matches
Mail list logo