select « html « 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 » html » select 

1. How do I select an html-select jquery    stackoverflow.com

My html is such:

<select id="slctDiv2" class="slct"><option value="0">Any</option>
<option   value="1">Administration</option><option value="2">Collections</option>     
<option value="3">Distribution</option><option value="4">Engineering</option>
<option value="5">Treatment</option></select>
How do I get the ID of the select item (in this case ...

2. JavaScript, DHTML, jQuery: How to implement 'two way' master detail relationship within 3 html drop-downs (select boxes)    stackoverflow.com

We have a requirement that has had me skimming the web for quite sometime now. Here is the problem scenario. We have a web-page and the page here contains three drop-downs ...

3. Selecting created HTML with jQuery    stackoverflow.com

Why doesn't this work?

var string = '<b>Hello</b> this is just a <b>test</b>';
console.log($(string).find('b'));
I would expect Firebug's console to give me the two <b> elements, but instead I get an empty array. However, if ...

4. Selecting HTML Comments with jQuery    stackoverflow.com

Does any one know how to select html comments with jquery?

<html>
<head>
    <title>Check Test</title>
    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>
    <script type="text/javascript">
     ...

5. Is there any way to determine if an HTML select is currently open?    stackoverflow.com

I have a page that is doing a continuous ajax refresh, and I don't want to do this refresh if the user is currently making a selection in a dropdown. ...

6. JQuery selection problem    stackoverflow.com

With this html:

<label for="DateOfBirth">
    <span>* </span>
    Date Of Birth:
</label>
How do I select and remove the span element using JQuery?

7. HTML select field updating another    stackoverflow.com

I'm trying to create a webpage to merge vendors in our database and have a page with two select fields like this:

<select name="vendor" id="vendor_select_from">
    <option  value="Apple" id="id0">Apple</option>
 ...

8. How can I get multi select dropdown box?    stackoverflow.com

I have two dropdown box. 1st box having list of values. When I click add button the selected value from dropdown1 shift to dropdown2. Then when I click "add all" button ...

9. jQuery wait for above code execution to complete    stackoverflow.com

I've written some javascript using jQuery to replace any select lists with a div and ul alternative so that it will give me some more styling control and make the drop ...

10. Calculating start and end selection indices in HTML through Javascript    stackoverflow.com

How can I get the start and end selection indices in browsers other than IE in contentEditable 'div'. For Ex., IE has the following method.

var oSelection;
var oTxtRange;
var units = -100000;
var iStartIndex ...

11. Select-box control with jquery    stackoverflow.com

I am using a selectbox:

<select name="priority" id="priority">
    <option value="4">Low</option>
    <option value="3" selected="selected">Normal</option>
    <option value="2">High</option>
    <option value="1">Emergency</option>
</select>
When user select "Emergency", ...

12. how to add horizontal line in html select control    stackoverflow.com

how to add horizontal line (<hr> tag) in the dropdown control or in select control in HTML.

13. Using jQuery replaceWith() with HTML Select    stackoverflow.com

I am attempting to replace a div class with a different one based on the content of an HTML select. Unfortunately, the following code doesn't seem to be working.

  <script ...

14. Playing with selects and javascript    stackoverflow.com

My code is:

<select name='main'>
   <option>Animals</option>
   <option>Food</option>
   <option>Cars</option>
</select>

<select name='other'>
   <option>Rats</option>
   <option>Cats</option>
   <option>Oranges</option>
   <option>Audi</option>
</select>
How can I filter my second ...

15. Jquery selection gone wrong?    stackoverflow.com

I have the following selection :

var squad_name= $("#squad option:selected").text();
and the HTML behind looks like this:
<div id="squad">
    <label>Squad Type:</label>
    <select id="choosesquad">
      ...

16. using .each() to iterate over selections for HTML5
and
    stackoverflow.com

Greetings all, I've written a script to create HTML5 image captions from regular image tags using <figure> and <figcaption>. My CMS uses FCKEditor, which always places embedded images inside of paragraphs. So my ...

17. multiple select with jquery    stackoverflow.com

<select id="example" name="example" multiple="multiple"> <option value="1">Option 1</option> <option value="2">Option 2</option> <option value="3">Option 3</option> <option value="4">Option 4</option> <option value="5">Option 5</option> </select>

<span class="click" id="1">one </span>
<span class="click" id="2">two </span>
<span class="click" id="3">three </span>
<span class="click" id="4">four ...

18. multiple select with jquery again    stackoverflow.com

Live example: http://jsfiddle.net/69naX/1/ I click "show", next click "one", "two" etc, unclick etc. This doesnt work good. Next I click hide. This is OK. Next I click "show" again and click ...

19. create an html select via jquery with a while statement or similar    stackoverflow.com

How do I write an html select statement via jquery? Let's say I've got this in mind:

<select id="mySelect">
  <option value="400">400</option>
  <option value="401">401</option>
  <option value="402">402</option>
  <option value="403">403</option>
</select>
And I need ...

20. jQuery / Javascript Prompt with Select inside    stackoverflow.com

title seems clear enough, but we never know. here's my problem, i got a serie of checkbox, each one is associated to a list of choices. ie: Checkbox1 => Opt1 => Opt2 Checkbox2 => ...

21. Dynamically set default selection in html with jQuery    stackoverflow.com

I am using the following line of code to dynamically set the default selection of a selection box in html with jQuery

   var y=...a value from the DB;
  ...

22. Get the html (source code) index of a selection?    stackoverflow.com

If I have

<div>
hello
</div>
and I select 'hello' with my cursor, the start index is 6, end is 11 (inclusive). Is there a way to get this information cross-browser with JavaScript or jQuery?

23. Prevent right/left arrow navigation in select    stackoverflow.com

I have 3 selects that I am enabling keyboard navigation(right and left arrow keys) to move between them. The default behavior when pressing the right or left arrow key is to ...

24. [jQuery] Auto-populate and get index in HTML Select    forum.jquery.com

I need to modify a complex web app. The web page has a set of"cascading" selects. That is, choosing "A" in the first HTML selectneeds to trigger code to load a specific list of values into thesecond Select and choosing something there needs to trigger code toload a specific set of values into the third Select, etc. Behind this page is ...

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.