[jQuery] Re: jQuery Selector Help

2009-12-23 Thread Mike Walsh
[ ... snipped ... ] > > ... and after looking at your code (which always helps), I see you're > referencing "this" (as opposed to jQuery's $(this)), which is why html() > wouldn't have worked. > > In that case, sure.  It's been said that "this" is more efficient than > creating a jQuery reference

Re: [jQuery] Re: jQuery Selector Help

2009-12-22 Thread Charlie Griefer
On Tue, Dec 22, 2009 at 10:40 AM, Charlie Griefer wrote: > On Tue, Dec 22, 2009 at 10:34 AM, Mike Walsh wrote: > >> >> [ ... snipped ... ] >> >> Thanks for pointing me in the right direction. This is what I ended >> up getting to work: >> >>jQuery("span.event", ".calendar-table").eac

Re: [jQuery] Re: jQuery Selector Help

2009-12-22 Thread Charlie Griefer
On Tue, Dec 22, 2009 at 10:34 AM, Mike Walsh wrote: > > [ ... snipped ... ] > > Thanks for pointing me in the right direction. This is what I ended > up getting to work: > >jQuery("span.event", ".calendar-table").each(function(){ >var html = this.innerHTML.replace(/()\

[jQuery] Re: jQuery Selector Help

2009-12-22 Thread Mike Walsh
On Dec 22, 12:09 pm, Charlie Griefer wrote: > 2009/12/22 Šime Vidas > > > Well, you selected BR elements, which are empty elements, so it's no > > mystery why this.innerHTML returns undefined... > > > Also, DIVs shouldn't appear inside SPANs... > > He did state that he's using generated HTML.  

Re: [jQuery] Re: jQuery Selector Help

2009-12-22 Thread Charlie Griefer
2009/12/22 Šime Vidas > Well, you selected BR elements, which are empty elements, so it's no > mystery why this.innerHTML returns undefined... > > Also, DIVs shouldn't appear inside SPANs... > He did state that he's using generated HTML. He has no control over it. Mike - this isn't really a jQ

[jQuery] Re: jQuery Selector Help

2009-12-22 Thread Šime Vidas
Well, you selected BR elements, which are empty elements, so it's no mystery why this.innerHTML returns undefined... Also, DIVs shouldn't appear inside SPANs...

[jQuery] Re: jQuery Selector Help

2009-12-22 Thread Mike Walsh
On Dec 22, 8:03 am, Dhruva Sagar wrote: > I would suggest you to wrap the sections within * into a div and select that > div. > > Thanks & Regards, > Dhruva Sagar. > [ ... snipped ... ] Unfortunately I don't have control of the generated content. The content is generated by a WordPress Calend

Re: [jQuery] jQuery Selector Help

2009-12-22 Thread Dhruva Sagar
I would suggest you to wrap the sections within * into a div and select that div. Thanks & Regards, Dhruva Sagar. On Tue, Dec 22, 2009 at 6:29 PM, Mike Walsh wrote: > Long time listner, first time caller ... > > I am struggling with a selctor and am hopeful someone can help me see > the fores

[jQuery] jQuery Selector Help

2009-12-22 Thread Mike Walsh
Long time listner, first time caller ... I am struggling with a selctor and am hopeful someone can help me see the forest through the trees. I am using a WordPress plugin which generates the following HTML: 26 * Christmas Break Christmas Break * http://localhost/?p=104"; style=""> Futsal T

[jQuery] Selector and fadeIn/Out problem! (need help)

2009-12-21 Thread heglandio
Hi people I need help with my navigation-system. My currently situation is the following: I've got a "closer" on my website, a button, that allows a close- function to the upper div-element, in which the closer seats. One level higher. It's the only parent-element with a "closer" on the website.

[jQuery] selector canbe chain.

2009-12-14 Thread caii
THIS WORK: $("li:lt(8):gt(3):even"); but this did not: $("ul:has(li:eq(3))");

Re: [jQuery] Selector fails and works

2009-12-08 Thread brian
I believe this is the problem: input[type="radio"][checked=true] The correct value for the "checked" attribute is "checked", not "true" (don't ask me why; I think it's a stinker), so jQuery comes up empty-handed. Whereas the other way you're approaching this: if (this.checked) ... works becaus

[jQuery] Selector fails and works

2009-12-07 Thread Beardsley Ruml
Sorry that this take a while to demonstrate but it's a complete puzzle (to me)! I would like to determine whether there are any checked radio buttons within the "selected_courses" in the following HTML: [ 5 more radio buttons] [ 2 more courses ] When t

[jQuery] Selector issue

2009-12-03 Thread Civette
Well i'm in trouble. Following code does not trigger : Code: Select all $("#cat_list > div").click(function() { alert("Bye bye!");; }); neither Code: Select all $("#cat_list ~ div").click(function() { alert("Bye bye!");; }); or Code: Select all $("#cat_list

RE: [jQuery] Selector Help

2009-11-30 Thread Rick Faircloth
Good, practical formatting for understand “the chain”… From: Michael Geary [mailto:m...@mg.to] Sent: Monday, November 30, 2009 3:28 AM To: jquery-en@googlegroups.com Subject: Re: [jQuery] Selector Help That's a nice solution. Let's make it easier to follow with some i

Re: [jQuery] Selector Help

2009-11-30 Thread Michael Geary
{ >> $(this).parent().siblings('li').removeClass('active'); >> $(this).parent('li').addClass('active'); >> }); >> >> Maurício >> >> -Mensagem Original- >> *De:* Charlie >> *Para:* jquery-en@googlegroups.com >> *Enviada em:* domingo, 29 de novembro de 2009 03:56 >> *Assunto:* Re: [jQuery] Selector Help >> ... >> >> Dave Maharaj :: WidePixels.com wrote: >> How would I go about adding class to the li in this set up? >> all >> some >> none >> >> ... >> >> >> >> >

Re: [jQuery] Selector Help

2009-11-29 Thread Michel Belleville
7;a.filter').click(function(){ > $(this).parent().siblings('li').removeClass('active'); > $(this).parent('li').addClass('active'); > }); > > Maurício > > -Mensagem Original----- > *De:* Charlie > *Para:* jquery-

Re: [jQuery] Selector Help

2009-11-29 Thread Mauricio (Maujor) Samy Silva
Enviada em: domingo, 29 de novembro de 2009 03:56 Assunto: Re: [jQuery] Selector Help ... Dave Maharaj :: WidePixels.com wrote: How would I go about adding class to the li in this set up? all some none ...

Re: [jQuery] Selector Help

2009-11-28 Thread Charlie
$('a.filter').click(function(){     $(this).parent().addClass('active'); }); Dave Maharaj :: WidePixels.com wrote: How would I go about adding class to the li in this set up? all some none $('a.filter').click(function(){ $(???).addClass('active'); }); Thanks Dave

[jQuery] Selector Help

2009-11-28 Thread Dave Maharaj :: WidePixels.com
How would I go about adding class to the li in this set up? all some none $('a.filter').click(function(){ $(???).addClass('active'); }); Thanks Dave

Re: [jQuery] selector performance

2009-11-10 Thread waseem sabjee
i would the best thing to do regardless of your selection method is to store them in variables. like this var obj = $(".wrap"); Now you have basically created an object reference point. you won't need to re-create in 99% of cases. so lets re-use our object reference. // get the width of your o

Re: [jQuery] selector performance

2009-11-10 Thread Michel Belleville
As to the why I don't know, but as to the which the solution is quite easy : do a benchmark. Michel Belleville 2009/11/10 Adam Tistler > I am using jquery 1.3.2. I was wondering which is faster and why: > > $('#my-id .main table tr.my-class') or > $('#my-id > .main > table > tr.my-class') or

[jQuery] selector performance

2009-11-10 Thread Adam Tistler
I am using jquery 1.3.2. I was wondering which is faster and why: $('#my-id .main table tr.my-class') or $('#my-id > .main > table > tr.my-class') or $('#my-id tr.my-class')

[jQuery] Re: jQuery selector return parent

2009-10-21 Thread vtjiles
Thanks Dave I think you may be on to something. I think $("*:has(> div.someClass)") would work. Won't be fast, but that's not a concern. I'll give it a shot tomorrow. On Oct 21, 12:40 pm, Dave Methvin wrote: > > Is there anyway to write a custom filter which returns the parent > > nodes of the s

[jQuery] Re: jQuery selector return parent

2009-10-21 Thread Dave Methvin
> Is there anyway to write a custom filter which returns the parent > nodes of the selector? ie) div.someClass:parentNode or ancestor: > div.someClass would return the parent element of div.someClass. Not that I know of, but you might be able to use the :has selector if you know enough about the

[jQuery] jQuery selector return parent

2009-10-21 Thread vtjiles
Is there anyway to write a custom filter which returns the parent nodes of the selector? ie) div.someClass:parentNode or ancestor: div.someClass would return the parent element of div.someClass. I know you can use .parent() in jQuery, but am using Selenium RC and am limited to using selector func

[jQuery] Selector and special characters

2009-09-29 Thread loicg
Hi, I want all my form inputs which name start with "fieldInstanceGroups [0].fieldInstances[1]". I try with jQuery('input[name^="fieldInstanceGroups[0].fieldInstances [1]"]') but any result. Then I try some requests, with \\ to escape special characters but I have any result. 'input[name^="field

[jQuery] Selector bind help

2009-09-08 Thread Dave Maharaj :: WidePixels.com
I have a simple form field that runs a query. I have $('#Query').bind('keyup', function() { ...delay then search so after key up and delay it runs the search. Now when I click on the #query field the dropdown appears with my previous search text...if i select one it goes into the #query fi

[jQuery] Re: jQuery selector for style attribute

2009-08-28 Thread John
ins > > > > > with 'ext-gen'" and other conditions along with that. As long as > > > > > you're not trying to read the style string. > > > > > > On Aug 26, 4:06 am,John wrote: > > > > > > > Thanks. > > >

[jQuery] Re: jQuery selector for style attribute

2009-08-27 Thread John
ke "if ID begins > > > with 'ext-gen'" and other conditions along with that. As long as > > > you're not trying to read the style string. > > > > On Aug 26, 4:06 am,John wrote: > > > > > Thanks. > > > > > Here is the html source, > > > &g

[jQuery] Re: jQuery selector for style attribute

2009-08-27 Thread John
h 'ext-gen'" and other conditions along with that. As long as > > > > you're not trying to read the style string. > > > > > On Aug 26, 4:06 am,John wrote: > > > > > > Thanks. > > > > > > Here is the html source, > > > >

[jQuery] Re: jQuery selector for style attribute

2009-08-27 Thread James
> > > Thanks. > > > > Here is the html source, > > > >   > > style="padding-left: 130px;"> > > >         > > >             > > value=""/> > > >             > >                    size=&quo

[jQuery] Re: jQuery selector for style attribute

2009-08-26 Thread John
I am working on the open source project: Tellurium automated testing framework, which is a web testing framework built on top of Selenium. We leverage jQuery to add jQuery selector as a locator to speed up the test performance in IE and also add other new functionalities. More details could be

[jQuery] Re: jQuery selector for style attribute

2009-08-26 Thread John
gt; > Thanks. > > > Here is the html source, > > >   > style="padding-left: 130px;"> > >         > >             > value=""/> > >             >                    size="24" readonly="true" style="width: 343px;"/> > >      

[jQuery] Re: jQuery selector for style attribute

2009-08-26 Thread James
John wrote: > Thanks. > > Here is the html source, > >   style="padding-left: 130px;"> >         >             value=""/> >                                size="24" readonly="true" style="width: 343px;"/> >      

[jQuery] Re: jQuery selector for style attribute

2009-08-26 Thread John
Thanks. Here is the html source, The style in the jQuery selector should match the one defined in the html source. I wonder if I did any other thing wrong here. Thanks, John On Aug 26, 6:45 am, Paolo Chiodi wrote: > Maybe t

[jQuery] Re: jQuery selector for style attribute

2009-08-26 Thread Paolo Chiodi
you know what is wrong? > > Thanks again, > > John > > On Aug 25, 2:50 pm, "Mauricio \(Maujor\) Samy Silva" > wrote: >> Sintax for the selector is: >> >> $('img[style="overflow: auto; width: 356px; height: 100px;"]') >> >> Ma

[jQuery] Re: jQuery selector for style attribute

2009-08-25 Thread John
That may not be an option, at least now. The reason is that the jQuery selector is automatically generated by a framework, which may be rather random and difficult to set another class. The first thing is to get it work. As long as the syntax is correct, it should work fine, right? I care more

[jQuery] Re: jQuery selector for style attribute

2009-08-25 Thread James
gt; > Here "not working" means it returns empty object where it should > return non-empty object. > > Do you know what is wrong? > > Thanks again, > > John > > On Aug 25, 2:50 pm, "Mauricio \(Maujor\) Samy Silva" > > wrote: > > Sintax for the sel

[jQuery] Re: jQuery selector for style attribute

2009-08-25 Thread John
te: > Sintax for the selector is: > > $('img[style="overflow: auto; width: 356px; height: 100px;"]') > > Maurício >   -Mensagem Original- >   De: John >   Para: jQuery (English) >   Enviada em: terça-feira, 25 de agosto de 2009 14:36 >  

[jQuery] Re: jQuery selector for style attribute

2009-08-25 Thread Mauricio (Maujor) Samy Silva
Sintax for the selector is: $('img[style="overflow: auto; width: 356px; height: 100px;"]') Maurício -Mensagem Original- De: John Para: jQuery (English) Enviada em: terça-feira, 25 de agosto de 2009 14:36 Assunto: [jQuery] jQuery selector for style att

[jQuery] jQuery selector for style attribute

2009-08-25 Thread John
Hi, I want to select the following image using jQuery selector to see if I could use the style attribute, but seems the selector img[style=overflow: auto; width: 356px; height: 100px;] does not work at all. What would be the correct selector for the style attribute? Thanks in advance

[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 help needed

2009-07-24 Thread iceangel89
with the markup like: i want to add a class "active" to , Link

[jQuery] Selector help

2009-07-18 Thread Warfang
I'm pretty new to Javascript/ jQuery, so this is really bugging me. I'm trying to get the height of an h1 that is a sibling to this. The value for the variable h1Height, however, returned as null in the console in Firebug. Perplexed, I tried console.logging ('this'+'+h1') to see what it was inter

[jQuery] Re: jQuery selector performance / jQuery Tester

2009-07-03 Thread olsch01
I re-ran the test now. test('#content a.submit'); test('a.submit'); test('.submit'); test('("#content").find("a.submit")'); Basically I get the same result: for my pages (!) element.MyClass has the best average performance. I guess it's as Karl mentioned earlier: "If the selectors aren't causin

[jQuery] Re: jQuery selector performance / jQuery Tester

2009-07-03 Thread olsch01
@Karl: o, that was a serious c&p "bug"... :) I was aware that IE6 and 7 don't support getElementsByClassName (see my initial message), still the results of my first test showed similar results for the class selector. I hope I didn't have another c&p bug in there... ;) @Mike: the pages I'm wor

[jQuery] Re: jQuery selector performance / jQuery Tester

2009-07-02 Thread Michael Geary
You can't measure whether one selector will be faster than another on all possible pages. All you can measure is which is faster on the page you're testing. On a page with only a single element, an 'a.submit' or even just an 'a' selector will be faster than '#content a.submit', because it's doin

[jQuery] Re: jQuery selector performance / jQuery Tester

2009-07-02 Thread Karl Swedberg
If you're doing this: test('#content a.submit'); then you shouldn't compare it to this: test('("#myDiv").find("span.myClass")'); that's "apples to oranges." instead, compare it to this: test('("#content").find("a.submit")'); The reason the other browsers are so much faster than IE 6 and 7wit

[jQuery] Re: jQuery selector performance / jQuery Tester

2009-07-02 Thread olsch01
Hi Karl, thanks for your reply. I used jQuery tester in FF2 + 3, IE6, 7 + 8, Opera 9.64 and I think also in Safari 4 (on my Win XP machine). The results were are all kinda similar. Using the class selector was always fastest. I just ran the following test (choosing jQuery 1.3.2 again): test('#

[jQuery] Re: jQuery selector performance / jQuery Tester

2009-07-02 Thread Karl Swedberg
On Jul 2, 2009, at 8:45 AM, north wrote: Hi, I just tested all my jQuery selectors using the jQuery Tester (http:// jquery.nodnod.net), and the results seem to "contradict" one thing I read in a performance article: that you should descend from the closest parent ID when using classes in you

[jQuery] Selector Syntax, new to jQuery

2009-07-02 Thread NauticalMac
Starting to use jQuery having read 'jQuery in Action'. Came across the following sysntax for sortable tables: $('table.sortable').each(function() { var $table = $(this); $('th', $table).each(function(column) . Clearly the $('th', $table).each syntax results in traversing 'th

[jQuery] Selector :eq(x) issuing warning in FF

2009-07-02 Thread Shane Riley
When calling this jQuery: $("#homepage-slides img:eq(0)").fadeOut(300, function() { $("#homepage-slides img:eq(1)").fadeIn(300, function() { $("#homepage- slides img:eq(0)").remove(); }); }); I'm getting this warning in the Web Developer toolbar in Firefox: Warning: Unknown pseudo-class

[jQuery] jQuery selector performance / jQuery Tester

2009-07-02 Thread north
Hi, I just tested all my jQuery selectors using the jQuery Tester (http:// jquery.nodnod.net), and the results seem to "contradict" one thing I read in a performance article: that you should descend from the closest parent ID when using classes in your selector (the article says "April 09", so th

[jQuery] Re: jquery selector

2009-06-25 Thread Lee R Lemon III
try this jQuery(document).ready(function() { $(".some-class").hover( function () { $(this).children('.inside').css ("display", "block"); }, func

[jQuery] jquery selector

2009-06-25 Thread vladush
hi, could anybody help me with jquery selectors? i have this code: ... on hover on each "some-class" element i want to set "display: block;" for div with "inside" class, but only on div which is child of actually hovered element. is it possible do something like this?

[jQuery] selector, second to last row of table

2009-06-16 Thread theprodigy
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().length - 1 to get the second to last row, but it d

[jQuery] selector strangeness -- is this a bug or am I doing it wrong?

2009-06-10 Thread morgancodes
Hello, I'm getting inconsistant results across browsers with the following test: test.html === http://www.w3.org/TR/html4/strict.dtd";> http://ajax.googleapis.com/ ajax/libs/jquery/1.3/jquery.min.js"> var xml; $.ajax({ type: "GET", url: "data.xml",

[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 not question

2009-06-04 Thread Dave Maharaj :: WidePixels.com
I am trying to disable all links except for the one clicked. $('a[class^="edit_"]').click(function(){ var url_id = $(this).attr('href'); var e = $(this).attr('class'); var x = $(this).attr('id').split('_'); var y = x[0]; var z = x[1]; alert(e); the alert shows edit_profile so e = edit_pro

[jQuery] Selector help

2009-06-04 Thread Dave Maharaj :: WidePixels.com
I am cleaning up some html code and originally i had Profile Settings but the DIV inside the LI was too much so I went with adding the id="profile to but script is no longer working Profile Settings

[jQuery] jquery selector trainer

2009-05-04 Thread ຄຳ
Hi all I made a jquery selector trainer. It's written using the jquery lib. http://lamp2.fhstp.ac.at/~lbz/beispiele/ss2009/jquery/ The problem I now have is that it is very slow and need Gigabytes of RAM for big examples using Firefox. Maybe someone has a hint to make it faster. Bernhard

[jQuery] Re: Webkit not complying with simple jQuery selector

2009-05-01 Thread Matt
Awesome, glad that can be verified. Thank you! Ticket opened: http://dev.jquery.com/ticket/4587 On May 1, 11:28 am, Ricardo wrote: > On May 1, 12:34 pm, Matt wrote: > > > I'm attempting to make every ".inputbox" element except the last one > > read-only on my webpage. Firefox and IE comply but

[jQuery] Re: Webkit not complying with simple jQuery selector

2009-05-01 Thread Ricardo
On May 1, 12:34 pm, Matt wrote: > I'm attempting to make every ".inputbox" element except the last one > read-only on my webpage. Firefox and IE comply but Safari and Chrome > apply "readonly" to ALL ".inputbox" elements on the page, even the > last one. > > I've narrowed down my issues to the se

[jQuery] Webkit not complying with simple jQuery selector

2009-05-01 Thread Matt
I'm attempting to make every ".inputbox" element except the last one read-only on my webpage. Firefox and IE comply but Safari and Chrome apply "readonly" to ALL ".inputbox" elements on the page, even the last one. I've narrowed down my issues to the selector in this line: $(".inputbox:not(:last

[jQuery] Selector help needed

2009-04-28 Thread Warfang
Here's my code: $(document).ready(function(){ $('#menulinks a').hover(function(){ setTimeout(function(){ $(this).stop().animate({ top : '40px', paddingTop : '40px'

[jQuery] Selector issue (i think), Cant control specific elements

2009-04-28 Thread stuart
Heres a very stripped down version of the page i'm trying to write. For simplicity, the Show / Hide functions (not meaning hide from view, but within a db) are the same (they change the background color of the div), the functions work for the most part but ignores certain divs (the ones titled Hid

[jQuery] selector speedup

2009-04-19 Thread Bruno K
Hi all I profiled my script with firebug and have seen that the "filter()" function is called very often. As far as I see this function is called when i use a selector like $("table[name="+name+"]")... Is there a possibility to speed that up? In XSLT there is the "key" function. see: http://www

[jQuery] Selector questions

2009-04-15 Thread Dragon-Fly999
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. = Question 1: In the click handler of the first c

[jQuery] jQuery Selector Help

2009-03-17 Thread side1021
Hi, Can some1 please explain this in detail to me? I am confused on the selector part $(''). // add list to ul var list = $('').attr ('class',_imageLoadClassName).appendTo('ul#'+_imgContainerId); Thanks!

[jQuery] Re: JQuery Selector

2009-03-13 Thread ricardobeat
It's not a selector. Where did you come across that? The "< >" makes it think you want to create an element. It does nothing more than creating a textNode that contains the string "<%=x.y %>" (and a temporary DIV to hold it). This $('< >') does the same. The '#' is ignored just as if you used $

[jQuery] JQuery Selector

2009-03-13 Thread rayglaser
This form of a selector is undocumented.. ('#<%=x.y%>').length What does it mean ? Thanks..

[jQuery] selector ":contains" different behaviour in firefox and msie 7

2009-03-08 Thread mcologne
hi, i have a strange behaviour when parsing the xml below: $.get('/test/Internetschuhe.XML', function(data) { $(data).find('item').each(function() { var $entry = $(this); var $sizenotnull = $entry.find("stock:contains('0')"); alert($sizenotnull.length); in firefox

[jQuery] selector query question

2009-03-06 Thread richajax
Hi guys, new to jQuery here.. I am trying to query xml using jquery and having some problem I need to query all the node under node A with name="test" if I do $("A").find(*[name=test]) it will return b,b1,c, d How do I query using "selector" to get only immediate child so I can get b,c,d (no b1

[jQuery] ~ selector is not selecting siblings

2009-02-25 Thread RadicalBender
I have a table that has a list of songs - one for each row. I also have a select menu that populates the song table data from an AJAX query based on what was selected. The first row of the table is a row (#NoSongs) that just says "No songs were found." in case no records were returned. And I just

[jQuery] Selector Efficiency?

2009-02-18 Thread Josh Rosenthal
So... a question regarding selector efficiency. The following snippet of HTML describes attributes associated with a polygon in an KML. Its basically a table of data, contained as s in s in a . Given this snippet, what would be the best (fastest) way to return the values of MAP_ID and SITE_ADDRES

[jQuery] selector best practice

2009-02-15 Thread SteelRing
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): ("#tableid tbody tr.rowclass td.cellclass") or is it ("td.cellclass") or (".cellclass"). And how about if

[jQuery] Selector broken with 1.3.1 vs 1.2.6

2009-02-13 Thread gibble
I was using 1.2.6 with the following line which worked perfectly. row.find("select." + name + " option[value='" + value + "']").attr('selected', true); Now with 1.3.1 a javascript error is happening A Runtime Error has occurred. Do you wish to Debug? Line: 4723 Error: Exception thrown and not

[jQuery] selector to return the number of rows in a table before the row I just selected

2009-02-08 Thread pantagruel
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. Thanks

[jQuery] selector finds element but changing css has no effect?

2009-02-04 Thread pantagruel
Hi, I have a div that is inside a td. My code is the following fragment: var currentelement = jQuery("#" + activecolid); var selectedcontent = jQuery("#" + activecolid).find ("div.contentdisplay"); alert(currentelement.html()); alert(selectedcontent.html()); selectedcontent.css({border: "10px s

[jQuery] Re: what would be the opposite of top.frames as a jquery selector context?

2009-01-30 Thread jquertil
it ended up being quite easy actually: $('#'+self.name, top.document).hide(); usually whenever I try to so something and it requires more than 1 line of code it's my fault, not jquery's...

[jQuery] Re: what would be the opposite of top.frames as a jquery selector context?

2009-01-27 Thread jay
This seemed to work on FF and IE: $('#myiframe')[0].onload=function(){ $("body",frames.frmName.document).html('test') } On Jan 27, 3:36 pm, jquertil wrote: > If i want to do something in a parent frame, I would do this: > > $('#myDiv', top.document).hide(); > > but what about this following

[jQuery] Re: what would be the opposite of top.frames as a jquery selector context?

2009-01-27 Thread jay
the $(frames.frameName.document).ready is not actually working on firefox.. you would probably have to put $(document).ready in the src page and poll it to see if the document is actually ready On Jan 27, 4:27 pm, jay wrote: > Look at the test case I made here and let me know if it helps: > > ht

[jQuery] Re: what would be the opposite of top.frames as a jquery selector context?

2009-01-27 Thread jay
Look at the test case I made here and let me know if it helps: http://jquery.nodnod.net/cases/73 On Jan 27, 3:36 pm, jquertil wrote: > If i want to do something in a parent frame, I would do this: > > $('#myDiv', top.document).hide(); > > but what about this following scenario? I'm inside a fra

[jQuery] Re: what would be the opposite of top.frames as a jquery selector context?

2009-01-27 Thread maggus.st...@googlemail.com
maybe the parent of your documentElement? On 27 Jan., 21:36, jquertil wrote: > If i want to do something in a parent frame, I would do this: > > $('#myDiv', top.document).hide(); > > but what about this following scenario? I'm inside a frame that was > created like so: > > $('body', top.document

[jQuery] what would be the opposite of top.frames as a jquery selector context?

2009-01-27 Thread jquertil
If i want to do something in a parent frame, I would do this: $('#myDiv', top.document).hide(); but what about this following scenario? I'm inside a frame that was created like so: $('body', top.document).append(''); inside myiframe, I now want to know the id of my iframe, because I would not

[jQuery] selector for children of specific element?

2009-01-24 Thread ChrisA
I need to run thru a table and do something for all rows that have a checkbox that is selected. I have to collect values from several columns in that row. Is there a way in jQuery to find child elements for a specific DOM element or jQuery wrapped set item? Thanks very much. I'm just get

[jQuery] $(selector).add($(.next))

2009-01-18 Thread Ami
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 solution. Thank you.

[jQuery] Selector Help

2009-01-18 Thread LexHair
I have a table structure with a multiple rows containing a checkbox input and 4 text inputs with distinct classes. I want to prefill two of the text inputs in the same row where the checkbox is checked. Example code for the first two rows: I nee

[jQuery] Selector *= not works in Safari 3.2.1 and Chrome 1.0.154.43

2009-01-16 Thread floyd
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*='"+subject+"']").remove(); Where #fp is a ... object Works fine in IE7 and FireFox 3.0.5 How can I fix this line or is a

[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 problem with $( "a[ajax\\:id='46']" )

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: alert( $( "a[ajax\\:id='46']" ).attr( 'href' ) ); I tried a lot, but it's not

[jQuery] Selector help

2009-01-13 Thread km...@fensys.com
I'm using a attribute selector and I want to combine the *= with the ! = on href. Is there any way to do this?

[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

  1   2   3   >