jquery-selectors

How do i handle the event for Hyperlink generated Dynamically

I have a table which displays the Dynamic rows from server side script .Each rows conatins various values and the first row value contains the link such as "Show/Hide" when we click on "show" it shows the sub rows and when clicked on "hide" it hides the rows. Now the "Show/hide" is dynamic is such way their id is .where $i is dynami...

Using multiple jQuery selectors to filter

I am trying to add the jQueryUI datepicker on a certain group of datefields, but exclude fields whose id ends in -0 Here is my code: $(function() { $("input[id^='TOEFLtestDate-']").not([id$='-0']).datepicker({ onClose: function(dateText, inst){ GenericDateUpdate(this.id, dateText,1); ...

JQuery dragable/dropable problem

Hello all, I am trying to build a dynamic drag&drop modul for my App. It include a table that holds all the dropable divs and few shapes. As i can't know from advance the type of shape someone will put in a div and i have to save the div or divs which the user chose to drop the shape in i need to allow the app to be very dynamic... I ...

Another jquery dynamic selector

I just asked a question here about selecting all id's of the form id_* where * is any string and id is the id of the element. I got a great working solution: $("*[id^=" + id + "_]").each(function() {... // id is the element name I need to take this one step further now: All of my ids will be of the form: a_b_c ... where a b and c are...

How to parse off a number in jQuery selection?

I am performing a selection on various radio buttons whose class starts with the name radio-selection and has some number at the end (e.g. radio-button1, radio-button2, etc). If the radio button is clicked, certain fields contained with that radio button need to be enabled or disabled. The good part is that the class of the that needs ...

How do i replace the "$$$" in string using Jquery

Iam using auto Complete method and spilliting the label and value $("#txt1").autocomplete({ minLength: 1, source: "/abc/ajax.php?param1=''&param2="+$("#txt1").attr("value"), select: function(event, ui) { var label= ui.item.label; var value= ui.item.value; var Arr = label.split('-')...

Tying in .addClass() with other functions?

Assuming an accordion dropdown with the standard form of: <ul> <li> <a href="#">Main Element</a> <ul> <li> <a href="#">Dropdown Element</a> </li> </ul> </li> </ul> I'm using jQuery to expand when the parent element link is clicked: var $j = jQuery.noConflict(); function initMenus() { $j('ul.menu u...

Properly setting the scope of a jQuery Selector

Hey guys I'm having a problem limiting the scope of a jQuery selector. I've created a slideshow widget that depends on an unordered list for a structure as follows: <ul id="caption"> <li class="visible"> <p> SwitchPoint Solutions is a leading provider of automated configuration solutions fo...

full HTML of object returned by jQuery selector

given this html: <li id="the_list_item"><img src="some_img"></li> and this selectior: $("#the_list_item") I want to get the full html from the object return by the jQuery selector. Using: $("#the_list_item").html() ...just gives me the inner html (the <img src="some_img"> part) But since: $("#the_list_item").attr("id") give...

jQuery - Click on LI, show/hide UL - Click on LI:a href, continue to show UL and open in Blank Window

Hello all, Thanks to the wonderful contributors here at SO! jQuery is much cooler when you begin to understand it. :) So I have an LI that when clicked shows/hides a child UL. What I would like to do is have the ability to click on an link inside the LI that opens a blank window, but also doesn't close the child UL. The blank window ope...

Clone Specific content of the div and put in other div

Hi I have a little problem when i try to clone an element with jquery basically I Have this, i want to clone the div called clone and put in other div in some where else. <li class="jqModal" > <div class="clone"> <div class="image"> <img src="<?php echo $products[$j]['thumb']; ?>" title="<?php ech...

Jquery - Select the second Style-Tag

Hi, how can i select the second Tag? $("head > style:nth-child(2)").html(); Thanks in advance. Peter ...

Is there such thing as a relative jQuery selector?

I have a reference to a jquery object with the this variable. I am looking for a way of applying the child selector to the object. I'm using $(this).find('table > tbody > tr > td'), but what I'm aiming for is something more like $('[Value of $(this) goes here somehow] > table > tbody > tr > td'). I realise that I can do $(this).childre...

jQuery selecting the 3rd, 4th and 5th TD in every row with ID

Hi, I am having some difficults selecting the proper cells in a table. I got a soccer games tables. Each table starts with ID 'game' and then the serial number, i.e: id='game122238' . Each table has two rows. On the first row I have 5 cells. On the second one I got one team. On the third one I got the result. On the Fourth I got the se...

asp.net jquery add row (clone row) with text box and drop down dynamically

When the user click's the add box attribute the row(i.e the row with 2 dropdown and textbox needs to be added) row with above needs to be dynamically created using jquery(so that there is no post back). User will be allowed to add as many attirbutes as he wants and when they click the check box that row needs to be deleted. How this can...

jQuery closest TR selection

Hope someone can advise. Having issues trying to remove a row once a link has been clicked. HTML <table> <tr><td>Some Data</td><td><a href="#" class="remove-row>Remove Row</a></td></tr> <tr><td>Some Data</td><td><a href="#" class="remove-row">Remove Row</a></td></tr> </table> Now the JS $("a.remove-row").live('click', function(...

Getting text from a paragraph in jquery

This might be a very simple thing in jquery but I am not able to figure it out. My html document has the following structure <div class="body"> <a href="/question?id=70"><p>This is the text I want to extract</p></a> </div> I tried this $("body").find("a p").text() but this does not seem to be working for me. I am able to get...

jQuery selector: addressing a submit button by ID fails

Given a submit button: <input type="submit" value="Sign Up" name="AddToCart" size="2" id="AddToCart" /> why wouldn't this code disable the button: $('#AddToCart').attr(disabled, 'disabled'); mny thx ...

How to check if a radio button in each group is checked in jQuery?

Multiple groups or radio buttons <h1>Question 1</h1> <input type="radio" name="radio1" value="false" /> <input type="radio" name="radio1" value="true" /> <h1>Question 2</h1> <input type="radio" name="radio2" value="false" /> <input type="radio" name="radio2" value="true" /> How can I check in jQuery that a radio button in each group...

Counting elements matching pattern before a point in the DOM

I have an element in the DOM d in a jQuery object and I'd like to count the number of elements matching font[color=#ff6600] before the element. Is there a CSS selector I can use for this? ...