jquery-selectors

jQuery select options with multiple values

Within a selector, how do I check if a value of an attribute contains 'a', 'b', or 'c' in a single line? Can you do for example: $('input[name]=a|b|c')? Well, I tested that and it didn't work. ...

How to select the first <td>s on the left of <table> with jQuery?

Say,how to select the tds of the 1st column with jQuery? ...

jQuery: Check to see if table row containing certain values exists already

Hi All, I have a jQuery script that appends a row to a table. In short, the user can select a value from a drop down menu, then enter in 'x' amount of months and hid 'add' which appends the row to the table, for example the following row is appended by the user: <tr> <td>Some Value</td <td>2</td> </tr> Now, if the user performs ...

line numbers using jquery

<div id="line_numbers"></div> <textarea cols="65" rows="15" name="comments" id="comments"></textarea> <textarea cols="65" rows="15" name="matches" id ="matches"></textarea> there are many examples out there( http://stackoverflow.com/questions/1995370/html-adding-line-numbers-to-textarea ) but i just want to implement line number...

after jQuery upgrade, uncaught exception: Syntax error, unrecognized expression: h3

I'm working on a new version of the website, and am now finding an issue with my javascript code that isn't being handled nicely. What I have been doing in the past is $('#lb_outer_title :h3').html(title); which changed the text of the title attribute for my lightbox. This worked fine in jQuery 1.3.2, but on the new version (which ...

help with jquery selector

hi! i have this html block: <p><strong>this is the title</strong>this is the content</p> how do i get only the "this is the content" string with jQuery? thank you :) ...

loop through all tr and validate controls inside td in jquery

i have a table whose structure is <table> <tr> <td> <input type="text" id="field_1" /> <input type="text" id="field_2" /> </td> </tr> <tr> <td> <input type="text" id="field_1" /> <input type="text" id="field_2" /> </td> </tr> <tr> ...

How to insert a break tag between text with jquery?

Updated The following is an output from a old CMS. I would like to insert a break tag after 'Klikk her om du er privatkunde! '. From this, <TR> <TD CLASS="td-main" COLSPAN="6"> <A HREF="link to some page">Other link here.</A> <A HREF="link to some page">There could be other link, but may be.</A> </TD> </TR> ... <TR> <TD CLASS="...

what is the equivalent of this javascript in Jquery

How do we write Equivalent value of this in Jquery document.getElementById( "selectbox"). options[document.getElementById("selectbox").selectedIndex].innerText; ...

whats wrong with my jquery radio button???

hello i am new to jquery can any one please tell me what's wrong with my code <html> <head> <title>jQuery Hello World</title> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"&gt;&lt;/script&gt; </head> <script type="text/javascript"> $("input[@name='chkBox']").click(function(){ ...

select all textarea which does NOT have a certain class in Jquery

Hi, I have several textareas like: <asp:textbox class="input ThisIsRussia" ..... /> <asp:textbox class="input" ..... /> <asp:textbox class="input ThisIsSparta" ..... /> <asp:textbox class="input" ..... /> Now, I have to select all the textarea / textbox which does not have the class "ThisIsSparta", how do I do it? I was checking the ...

jquery name$= or name=

Lets say I have named some elements with the following structure: 1:0 11:0 21:0 When I was looking for the value of 1:0 I found that the following code returned everything with a 1:0 in it: alert($("[name$=" + arrayVal[i] + "]").val()); However when I took the "$" out it appears to only return the 1:0 in my above example. I did a...

Is that possible to select all elements that does not match a selector ?

I have a table with lots of rows. I would like to select all rows that does not match some selector. For example: $('#my_table tr').each(function() { if ($(this).find(".class_a.class_b[my_param='" + my_value + "']").length > 0) { $(this).do_something(); } }); Is that possible to do the same in easier way ? ...

Select all element with a not null id, in jQuery

Hi, I want to implement .draggable class to all elements in my document, with an existing id using jQuery 1.4.2 <div id="blabla">asdsda</div> -> OK <div>dsds</div> -> NOT OK Is this possible ? i tried : $("*[id!=null]") but i does not work :s ...

What's the difference between $(this) and this in jQuery?

What's the difference between $(this) and this in jQuery, and why do they sometimes give the same result and other times behave differently? ...

How do I select the 'Browse' button from a file input html element with jQuery?

I have a page that is themed with jQuery UI, but I can't find how to select the file upload 'Browse' button to theme it as well. Is there a way to do this, or is this even possible? ...

jQuery selector :link not working with $.is() or $.filter()... ?

It seems like the selector ":link" is not supported by jQuery's filter() or is() function. For instance, if I evaluate $(":link") on a page it returns multiple links. If I evaluate $(":link").filter(":link") or $(":link").is(":link"), an error is thrown. The error message is "Syntax error, unrecognized expression: link". Is this by d...

How do i know what values have been changed in the table in jquery

I have a Html Table which consists of rows that were generated dynamically (from PHP) and each row conatins the select box and textbox with the values. Now how do i know which row has been changed (i mean Select box and textbox). Iam looking to have a list of (1,3,5,7) rows that have been changed so that i can pass them to the hidde...

How to select an anchor element inside a div created at runtime with jquery?

Hi, I have this markup: <body> ... ... <div class="helper"> <div class="menu-container"> <ul class="menu"> <li><a href="#" class="theLink">Link 1</a></li> <li><a href="#" class="theLink">Link 2</a></li> <li><a href="#" class="theLink">Link 3</a></li> ...

How do we find the row in the table which was changed

In the below table starting from <td>2</td> to the last everything is dynamic values from PHP. So each row contains the selectbox and the textbox which are dynamic. If any of the values are changed I should be able to get the row number such as "2" or "3" or "4" or so on which was in td how do i get that how do I create an array with t...