add « selector « jQuery Q&A

Home
jQuery Q&A
1.addClass
2.alert
3.array
4.attribute
5.browser
6.callback
7.clone
8.Cookie
9.Date
10.Development
11.document
12.dom
13.element
14.filter
15.Firefox
16.flash
17.format
18.html
19.input
20.internet explorer
21.json
22.mootools
23.page
24.performance
25.regex
26.safari
27.selector
28.setTimeout
29.String
30.table
31.Text
32.trigger
33.URL
34.video
35.xml
jQuery Q&A » selector » add 

1. jQuery add option to select    stackoverflow.com

When I attempt to add an option to a select the option I'm trying to append ends up appended to the first option instead of the select itself.

 $(".ct [value='']").each(function() {
 ...

2. Can't change select value after adding options    stackoverflow.com

I'm experiencing odd behavior after adding options to a select via ajax. After adding the items to the select, I want to select one of the items in the list based on ...

3. How do I add a JQuery locators to Selenium Remote Control    stackoverflow.com

I've been using XPath with Selenium quite happily and even using getEval with a but of Javascript, but a colleague said wouldn't it be great to be able to use JQuery ...

4. JQuery: Adding space between multiple selections    stackoverflow.com

I select some paragraphs inside a div:

$('#myDiv p.p1, #myDiv p.p2').text();
My problem is that I want to add space between each selection so that the output is: "paragraph1 (space) paragraph2" instead of ...

5. Jquery: adding a selector to an already selected object    stackoverflow.com

Greetings, By using the regular selector, I am able to select the grand parent of an input text field (which is a element actually), and via .next() I selected the next ...

6. Adding variables to jquery selectors    stackoverflow.com

How can I add variables into my selectors :

function addCurrentClass(){
    var loc = window.location;
    $('#nav li a[href = "' + loc + '"]').addClass('currentpage');
}
I've tried many ...

7. how to add a variable into a selector    stackoverflow.com

i wanna turn this

document.getElementById('group_'+group).value = attribute;
into jquery format so that it looks cleaner. i tried this and it doesnt work
$("#group_" +group).val() = attribute;

8. Adding options to select only works if jquery is not involved    stackoverflow.com

I have two code samples here. The first one is an isolated version of what I'm struggling with in the second file. I found that the first ...

9. JQuery Add two selections together    stackoverflow.com

With the power of jquery... I'm attempting to add two selections together, they both contain the same type of element (<option>). But the add(..) method doesn't seem to be playing ball.

var matchingRemovedOptions = ...

10. add parent to jquery selector    stackoverflow.com

<tr step="step2" optional="true"><td>Gender</td></tr>
<tr step="step2" optional="true">
     <td>
         <asp:RadioButtonList ID="rblGender" runat="server" RepeatDirection="Horizontal">
          ...

11. Add/Subtract Selected Value from Integer    stackoverflow.com

I'm quite new to jquery. I've made extensive use of what i've been able to find and understand. However, i'm not sure at all how to tackle this particular problem. I have ...

12. add class to option in select    stackoverflow.com

Based on the value of an option would that be possible to add a class to an option? So if i have this:

   <select class="rubrique" name="ctl00">
    <option ...

13. if option in select has class then add class    stackoverflow.com

is there a way to do: if options have class 1 and 2 then add class A in jQuery? So this :

<select class="rubrique" name="ctl00">
       ...

14. jQuery: Select Options - Adding Prices    stackoverflow.com

I'm new to coding. I have a two part question: 1.Let's say I have:

#html    
<style>
    <option value="1"> Red Box </option>
    <option value="2"> ...

15. JQuery: Using :not(.active) selector, and adding an Active class, to the item selected    stackoverflow.com

I'm new to Javascript and am having a bit of an issue with using a NOT selector, and adding a class during the function, hopefully this will make sense to someone. I ...

16. Select added listitem of select    stackoverflow.com

I have a select:

    <select id="club">
      <option>&nbsp;</option>
      <option value=bla1>bla1</option>
      <option value=bla2>bla2</option>
   ...

17. Is there any difference in jQuery("sel1").add("sel2") and jQuery("sel1, sel2")    stackoverflow.com

Well, the question is in the title. Is there any difference (performance, caveats) between multiple selector

jQuery("selector1, selector2")
and adding elements to selection with add:
jQuery("selector1").add("selector2")

18. Jquery add + or minus to class selector    stackoverflow.com

I'm using

<script>
$("#a-slots-16-history div:nth-child(odd)").addClass(function() {
    return "slick-toggle" + $(this).index();
});
</script>
to give a value to every other div on on my website so the 3rd div will have the class .slick-toggle-2 ...

19. How to get ids when a value is selected in fcbkcomplete? - jsfiddle added    stackoverflow.com

Please go through the below fiddle. I am trying to get the ids of the selected products in the fcbkcomplete box and show it as comma separated values in the textbox ...

20. Adding variable to selector id?    forum.jquery.com

jQuery newbie here. Basically I have a carousel, and when an item is hovered on, it's corresponding titles needs to show up below. I've managed to get a very inefficient version this working by repeating the function with the explicit id for the list item, but I'd like to get this working in a more automated fashion by assigning a variable ...

23. add or change property in selector    forum.jquery.com

I'm looking for a way to add or change a property value in a previously defined CSS class - not just HTML objects that have that class. Then if later objects are assigned with this class, the objects would inherit the properties of the updated class. For example, if I change the class "image" to add "display:none", and then ...

24. [jQuery] Adding selectors to $(this)?    forum.jquery.com

Hi all,Writing a sortable list function.My

  • elements contain several items (headings, paragraphs etc) andI want to add a class to the headings when they've been sorted.I have this code in my sortable init: receive: function(event, ui) { $(ui.item).addClass('editable'); ...

  • 25. Selectors on new added classes    forum.jquery.com

    26. [jQuery] Select Option add Class    forum.jquery.com

    This might have been resolved, but I can't find a solution with mysearch. I'm trying to add a class with the text of the option. Simpleto do the selected option, but not all of them it seems.I want to change:to:

    27. [jQuery] How to add a new item after selected item?    forum.jquery.com

    How do I add a new LI to a UL. When the user clicks on the label Iwant to add a new LI as a sibling to the LI that has the class sel. Iknow I can easily add it as a child of parent UL but how do I make itappear in between the selected LI and the next LI ...

    java2s.com  | Contact Us | Privacy Policy
    Copyright 2009 - 12 Demo Source and Support. All rights reserved.
    All other trademarks are property of their respective owners.