Search Results

Search found 17401 results on 697 pages for 'jquery selectors'.

Page 18/697 | < Previous Page | 14 15 16 17 18 19 20 21 22 23 24 25  | Next Page >

  • Get the selected option id with jQuery

    - by Itamar Bar-Lev
    Hi, I'm trying to use jQuery to make an ajax request based on a selected option. Is there a simple way to retrieve the selected option id (e.g. "id2") using jQuery? <select id="my_select"> <option value="o1" id="id1">Option1</option> <option value="o2" id="id2">Option2</option> </select> $("#my_select").change(function() { //do something with the id of the selected option });

    Read the article

  • How can I determine if jquery tab is shown because of user click or from tab rotation

    - by Richard Edwards
    I've been using the jQuery UI tabs for a bit now and an interesting request has come up. The current tab setup is using the rotation feature. I need to find a way to determine if the tab is shown because of the result of the rotation itself, or because a user physically clicked the tab. I've wired up all of the standard events, show and select and they fire regardless of the source of the tab change. Does anyone have any ideas? Basically I'd like to do something additional if the user clicked the tab, but not if the tab changes by itself via the rotation. If I wire up the click even to the tabs themselves it doesn't seem to get fired at all, I'm assuming because the tabs widget is using that event itself.

    Read the article

  • JQuery: show div on radiobutton select

    - by nav
    Hi, I am trying to use JQuery to show a div when the user selects a particular radio button (Other) within a radiobutton group. The html is below <div id="countries"> <input id="Washington_D.C" TYPE="RADIO" NAME="location" VALUE="Washington">Washington D.C</input> <input id="Other" TYPE="RADIO" NAME="location" VALUE="">Other</input> <div id="other locations" style="display: none"> </div> </div> Using the JQuery code: $(document).ready(function(){ $("radio[@name='location']").change(function(){ if ($("radio[@name='location']:checked").val() == 'Other') $("#county_drop_down").show(); }); }); But its not showing the div 'other locations' when I select the radiobutton'Other'....

    Read the article

  • jQuery :contains(unicode_characters)

    - by SeanJA
    I have an element like this: <span class="tool_tip" title="The full title">The ful&#8230;</span> This seems to work: jQuery('span:contains(…)'); But this does not: jQuery('span:contains(&#8230;)'); I am pretty sure that it would be bad to use the first one because if someone else saves the file, or the browser decides to get the file in a different character set for some reason things will not work. There has to be a way to properly select this span, right?

    Read the article

  • Cloning a selector + all its children in jQuery?

    - by HipHop-opatamus
    I'm having trouble getting the following JQuery script to function properly - its functionality is as follows: 1) Hide the content below each headline 2) Upon clicking a headline, substitute the "#first-post" with the headline + the hidden content below the headline. I can only seem to get the script to clone the headline itself to #first-post, not the headline + the content beneath it. Any idea why? <HTML> <HEAD> <script src="http://code.jquery.com/jquery-latest.js"></script> </HEAD> <script> $(document).ready( function(){ $('.title').siblings().hide(); $('.title').click( function() { $('#first-post').replaceWith($(this).closest(".comment").clone().attr('id','first-post')); $('html, body').animate({scrollTop:0}, 'fast'); return false; }); }); </script> <BODY> <div id="first-post"> <div class="content"><p>This is a test discussion topic</p> </div> </div> <div class="comment"> <h2 class="title"><a href="#1">1st Post</a></h2> <div class="content"> <p>this is 1st reply to the original post</p> </div> <div class="test">1st post second line</div> </div> <div class="comment"> <h2 class="title"><a href="#2">2nd Post</a></h2> <div class="content"> <p>this is 2nd reply to the original post</p> </div> <div class="test">2nd post second line</div> </div> </div> <div class="comment"> <h2 class="title"><a href="#3">3rd Post</a></h2> <div class="content"> <p>this is 3rd reply to the original post</p> </div> <div class="test">3rd post second line</div> </div> </div> </BODY> </HTML>

    Read the article

  • How can I make a Jeditable (jQuery) span activate editing on more than one event?

    - by JonathanHayward
    For the jQuery extension Jeditable, one of the parameters that can be specified is which DOM event will turn a div/span/... into a text input/textarea/... I would like to have more than one event serve as a trigger; that is, I would like either a click event or a contextmenu event to turn a span into an in-place edit area. Is there a graceful way to do this without forking Jeditable? --edit-- An example of code specifying the event is below. The parameter is optional, defaulting to a regular click. $(".edit_rightclick").editable("/ajax/save", { cancel: "Cancel", submit: "OK", tooltip: "Right click to edit.", event: "contextmenu", }); Calling twice, once for the regular click event with the event unspecified, and one for the contextmenu event (right-click if there are no switched mouse buttons or anything like that) does not seem to produce the intended effect of an element becoming editable in place on a click from either mouse button.

    Read the article

  • Methodology to understanding JQuery plugin & API's developed by third parties

    - by Taoist
    I have a question about third party created JQuery plug ins and API's and the methodology for understanding them. Recently I downloaded the JQuery Masonry/Infinite scroll plug in and I couldn't figure out how to configure it based on the instructions. So I downloaded a fully developed demo, then manually deleted everything that wouldn't break the functionality. The code that was left allowed me to understand the plug in much greater detail than the documentation. I'm now having a similar issue with a plug in called JQuery knob. http://anthonyterrien.com/knob/ If you look at the JQuery Knob readme file it says this is working code: <input type="text" value="75" class="dial"> $(function() { $('.dial') .trigger( 'configure', { "min":10, "max":40, "fgColor":"#FF0000", "skin":"tron", "cursor":true } ); }); But as far as I can tell it isn't at all. The read me also says the Plug in uses Canvas. I am wondering if I am suppose to wrap this code in a canvas context or if this functionality is already part of the plug in. I know this kind of "question" might not fit in here but I'm a bit confused on the assumptions around reading these kinds of documentation and thought I would post the query regardless. Curious to see if this is due to my "newbi" programming experience or if this is something seasoned coders also fight with. Thank you. Edit In response to Tyanna's reply. I modified the code and it still doesn't work. I posted it below. I made sure that I checked the Google Console to insure the basics were taken care of, such as not getting a read-error on the library. <!DOCTYPE html> <meta charset="UTF-8"> <title>knob</title> <link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.2/themes/hot-sneaks/jquery-ui.css" type="text/css" /> <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.js" charset="utf-8"></script> <script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.21/jquery-ui.min.js"></script> <script src="js/jquery.knob.js"></script> <div id="button1">test </div> <script> $(function() { $("#button1").click(function () { $('.dial').trigger( 'configure', { "min":10, "max":40, "fgColor":"#FF0000", "skin":"tron", "cursor":true } ); }); }); </script>

    Read the article

  • What jquery based table plugin can hide sub rows?

    - by user1458290
    I'm in the need to convert excel macros into jquery code, the function is that you need to click on the plus sign to unfold and show the sub rows to modify column2 if you want to type values in column2, the other columns can't be modified. You can't straightly modify values of column2 until you unfold the parent row, because there are many sub rows belonging to parent row,say Car. The values of Name, Model, Code are existing, they are master data, no need to type or modify. please see the snapshot at folded and unfolded, besides modifying values in sub rows , I need to be able to know which sub rows are modified and values of those rows.Initially the editable columns are blank. And when you click on the minus sign, the sub rows can be folded again,but the modified values won't be lost,they are still there when unfolded again. One last requirement is it's cross devices, the code must run well on pc,mobile phone,pad. Is that possible? Many thanks.

    Read the article

  • jquery javascript error using $(...) selector

    - by waitinforatrain
    Hi, I'm migrating some old code to jquery: xmlHttp.onreadystatechange = function() { if (xmlHttp.readyState == 4) { $("#" + ajaxArea).html (xmlHttp.responseText); $("#" + ajaxArea).attr('title', 'Login'); $("#" + ajaxArea).dialog({ height : 140, modal : true }); } }; where ajaxArea is the ID of a DIV in the HTML. The dialog bit is basically adapted from the jQuery example here: http://jqueryui.com/demos/dialog/#modal All of it works fine up until the last line. Firefox throws an error that simply says "$(" for that line. Anyone know what might be causing this?

    Read the article

  • Creating a simple accordion with JQuery

    - by nikolaosk
    This another post that is focusing on how to use JQuery in ASP.Net applications. If you want to have a look at the other posts related to JQuery in my blog click here We all know that there is always a limited space in our web page to show content.In this example I would like to show you how to create an accordion "effect" on a simple .aspx page. Some basic level of knowledge of JQuery is assumed. Sadly, we canot cover the basics of JQuery in this post so here are a few resources for you to focus...(read more)

    Read the article

  • Are jQuery's :first and :eq(0) selectors functionally equivalent?

    - by travis
    I'm not sure whether to use :first or :eq(0) in a selector. I'm pretty sure that they'll always return the same object, but is one speedier than the other? I'm sure someone here must have benchmarked these selectors before and I'm not really sure the best way to test if one is faster. Update: here's the bench I ran: /* start bench */ for (var count = 0; count < 5; count++) { var i = 0, limit = 10000; var start, end; start = new Date(); for (i = 0; i < limit; i++) { var $radeditor = $thisFrame.parents("div.RadEditor.Telerik:eq(0)"); } end = new Date(); alert("div.RadEditor.Telerik:eq(0) : " + (end-start)); var start = new Date(); for (i = 0; i < limit; i++) { var $radeditor = $thisFrame.parents("div.RadEditor.Telerik:first"); } end = new Date(); alert("div.RadEditor.Telerik:first : " + (end-start)); start = new Date(); for (i = 0; i < limit; i++) { var radeditor = $thisFrame.parents("div.RadEditor.Telerik")[0]; } end = new Date(); alert("(div.RadEditor.Telerik)[0] : " + (end-start)); start = new Date(); for (i = 0; i < limit; i++) { var $radeditor = $($thisFrame.parents("div.RadEditor.Telerik")[0]); } end = new Date(); alert("$((div.RadEditor.Telerik)[0]) : " + (end-start)); } /* end bench */ I assumed that the 3rd would be the fastest and the 4th would be the slowest, but here's the results that I came up with: FF3: :eq(0) :first [0] $([0]) trial1 5275 4360 4107 3910 trial2 5175 5231 3916 4134 trial3 5317 5589 4670 4350 trial4 5754 4829 3988 4610 trial5 4771 6019 4669 4803 Average 5258.4 5205.6 4270 4361.4 IE6: :eq(0) :first [0] $([0]) trial1 13796 15733 12202 14014 trial2 14186 13905 12749 11546 trial3 12249 14281 13421 12109 trial4 14984 15015 11718 13421 trial5 16015 13187 11578 10984 Average 14246 14424.2 12333.6 12414.8 I was correct about just returning the first native DOM object being the fastest ([0]), but I can't believe the wrapping that object in the jQuery function was faster that both :first and :eq(0)! Unless I'm doing it wrong.

    Read the article

  • jQuery text attribute selector

    - by Shagglez
    I am trying to use the text attribute as a selector, but I can't quite grasp the behaviour, would really appreciate if someone could explain. For example given <span class="span_class"><a class="a_class">text</a></span>, $('a.a_class').text() gives "text" as expected. However $('a.a_class[text]') wouldn't match any elements, and neither would $('span.span_class > a.a_class[text]'), but $('span.span_class* > a.a_class[text]') would (although not in IE). The only workaround I can think of for IE, is loop through all anchors contained in a span, use .text() on each and match it against a certain criteria, but it seems slower than using in-built selectors. Anyone have better ideas?

    Read the article

  • What is wrong with the nested accordion in jquery?

    - by Xaisoft
    The problem below with the nested accordion is that if a question is large enough, the answer does not push other questions down when it is expanded, it overlaps it. What is the problem? <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.1/jquery-ui.min.js"></script> <script type="text/javascript"> $(document).ready(function () { $("#accordion").accordion({ collapsible: true, active: false }); $("#general-questions").accordion({ collapsible: true, active: false }); }); </script> <h2>Frequently Asked Questions</h2> <div id="accordion"> <h3> <a href="#">General</a></h3> <div id="general-questions"> <h3> <a href="#">Question 1</a></h3> <div> Answer 1</div> <h3> <a href="#">Question 2</a></h3> <div> Answer 2</div> <h3> <a href="#">Question 3</a></h3> <div> Answer 3</div> </div> </div>

    Read the article

  • How to use JQuery Validate to create a popup with all form error when the submit button is clicked?

    - by Larry
    I am using the JQuery Validation plugin for client side form validation. In addition to the colorful styling on invalid form fields, my client requires that a popup message be shown. I only want to show this message when the submit button is click because it would drive the user crazy otherwise. I tried the following code, but errorList is always empty. Anyone know the correct way to do something similar. function popupFormErrors(formId) { var validator = $(formId).validate(); var message = ''; for (var i = 0; i < validator.errorList.length - 1; i++) { message += validator.errorList[i].message + '\n'; } if (message.length > 0) { alert(message); } } $('#btn-form-submit').click(function(){ $('#form-register').submit(); popupFormErrors('#btn-form-submit'); return false; }); $('#form-register').validate({ errorPlacement: function(error, element) {/* no room on page */}, highlight: function(element) { $(element).addClass('invalid-input'); }, unhighlight: function(element) { $(element).removeClass('invalid-input'); }, ... }); Update From the info in the accepted answer I came up with this. var submitClicked = false; $('#btn-form-submit').click(function() { submitClicked = true; $('#form-register').submit(); return false; }); $('#form-register').validate({ errorPlacement: function(error, element) {/* no room on page */}, highlight: function(element) { $(element).addClass('invalid-input'); }, unhighlight: function(element) { $(element).removeClass('invalid-input'); }, showErrors: function(errorsObj) { this.defaultShowErrors(); if (submitClicked) { submitClicked = false; ... create popup from errorsObj... } } ... });

    Read the article

  • Jquery: How can I Get/Set html of a String Variable by using Jquery Selectors ?

    - by ryan.dingy
    Hi all. Firstly, sorry for my English (I'm from China). By reading this article(http://stackoverflow.com/questions/2421719/how-to-apply-jquery-element-selection-to-a-string-variable), I can successfully get Elements from a String which stores HTML text. For example: var htmlstr = "<div><ul><li>some text 1</li></ul></div><div><ul id=list><li>some text 2</li></ul></div>"; var s = $('ul#list', $(htmlstr)).html(); s will be <li>some text 2</li>. It's what I want. But the question is, if I want to add another LI element to this string (htmlstr) how can I do? I set s = new html string but htmlstr doesn't change. Thanks

    Read the article

  • Disabling the right-click sub menu using JQuery

    - by nikolaosk
    Recently I needed to disable the right-click contextual menu in an HTML page for a very simple HTML application I was creating for a friend.This is going to be a short post where I will demonstrate how to disable the right-click contextual menu.I will use the very popular JQuery Library. Please download the library (minified version) from http://jquery.com/downloadPlease find here all my posts regarding JQuery.In this hands-on example I will be using Expression Web 4.0.This application is not a free application. You can use any HTML editor you like.You can use Visual Studio 2012 Express edition. You can download it here. I am going to create a very simple HTML 5 page with some text and an image. The HTML markup for the page follows. <!DOCTYPE html><html lang="en">  <head>    <title>HTML 5, CSS3 and JQuery</title>        <meta http-equiv="Content-Type" content="text/html;charset=utf-8" >    <link rel="stylesheet" type="text/css" href="style.css">     <script type="text/javascript" src="jquery-1.8.2.min.js">        </script><script type="text/javascript"> (function ($) { $(document).bind('contextmenu', function () { return false;}); })(jQuery); </script>       </head>  <body>      <div id="header">      <h1>Learn cutting edge technologies</h1>      <h2>HTML 5, JQuery, CSS3</h2>    </div>      <figure>  <img src="html5.png" alt="HTML 5"></figure>        <div id="main">          <h2>HTML 5</h2>                        <article>          <p>            HTML5 is the latest version of HTML and XHTML. The HTML standard defines a single language that can be written in HTML and XML. It attempts to solve issues found in previous iterations of HTML and addresses the needs of Web Applications, an area previously not adequately covered by HTML.          </p>          </article>      </div>             </body>  </html> This is the JQuery code, I use (function ($) { $(document).bind('contextmenu', function () { return false;}); })(jQuery); I simply disable/cancel the contextmenu event.When I load the simple page on the browser and I right-click the context menu does not appear.Hope it helps!!!

    Read the article

  • jQuery UI ThemeRoller - Installing themes

    - by CJM
    I'm trying to install jQuery UI with a ThemeRoller theme for the first time. I've downloaded jquery 1.4.2... I've downloaded jQuery UI with a couple of themes. I've tried to follow the instructions but they seem contradictory and don't seem to related to the downloaded files. When I try to use a datepicker... the datepicker functionality works, but it has the default (grey) style. This page refers to a folder/sub-folder/css files that don't exist. This page refers to a ui.theme.css file that doesn't exist. The downloads I received included the following: --demos --docs --external --themes ----base ----[theme name] --ui ----i8n ----minified --js So what do you put where? I've copied the js to the appropriate directory and linked it into my page. And I copied the themes/base folder as well, and linked into the jquery.ui.all.css file. Even the included demos only display the default (grey) styling. Where am I going wrong? The head section: <script type="text/javascript" src="/scripts/jquery-1.4.2.min.js"></script> <script type="text/javascript" src="/scripts/jquery-ui-1.8.custom.min.js"></script> <link rel="Stylesheet" href="/css/smoothness/jquery.ui.all.css" /> The body section: <script type="text/javascript"> $(function() { $("#datepicker").datepicker(); }); </script> <div> <p>Date: <input type="text" id="datepicker" /></p> </div>

    Read the article

  • jQuery validate plugin against custom jQueryUI datePickers

    - by Enrique
    I have some datePickers I've customized these so they show only month and year This is the code to create them jQuery("input[name*='fechauso']").each(function() { jQuery(this).datepicker({ changeMonth: true, changeYear: true, showButtonPanel: true, dateFormat: 'MM yy', constrainInput: true, showOn: 'button', buttonText: 'Seleccionar...', onClose: function(dateText, inst) { var month = jQuery("#ui-datepicker-div .ui-datepicker-month :selected").val(); var year = jQuery("#ui-datepicker-div .ui-datepicker-year :selected").val(); jQuery(this).datepicker('setDate', new Date(year, month, 1)); } }); }); Now I've added a custom validator method (using plugin) to check this: If user didn't select a date using the button, field is empty, so the custom validator method should fire. This doesn't happen. Here is the custom validate method jQuery.validator.addMethod("isEmpty", function(value, element) { return (value == ''); }, "Must select a date with the button besides control"); jQuery("#ct_2_fechauso").rules("add", { required: "#campotilde_psico:checked", isEmpty: true }); The problem is that even if I select a date, it always ask me to select a date again. datePicker fields should be readonly

    Read the article

  • jQuery XML loading and then innerfade effect

    - by Ryan Max
    Hello, I think I can explain myself without code, so for brevity's sake here we go: I am using jquery to pull data from an xml and put it into a ul on the page with each xml entry as a li. This is working great! However, what I am trying to do afterwards is use the innerfade plugin to make a simple animation between each of the li's. It's not working though, as it is still just loading the static list with each item visible (whereas if innerfade was working it would only display the first....then fade into the second, etc) It's not an innerfade problem however, because if I add the list in manually to the page (not injecting it with jquery) then the innerfade works fine. I'm relatively new to DOM scripting, so I think I am missing something here. I'm not quite sure how jQuery sequences everything, and I'm having trouble phrasing my question in a search engine friendly manner so here I am. Is it possible to have jquery pull the data from xml, then inject it into the page, then have innerfade work it's magic? Or am I thinking about this the wrong way? xml code: $.ajax({ type: "GET", url: "xml/playlist.xml", dataType: "xml", success: function(xml) { $(xml).find('song').each(function(){ var name = $(this).attr('title'); var date = $(this).attr('artist'); var message = $(this).attr('path'); $('<li></li>').html('<span id="an_name">'+name+'</span><span id="an_date">'+date+'</span><span id="an_message">'+message+'</span>').appendTo('#anniversary'); }); } }); innerfade code: <script type="text/javascript"> jQuery.noConflict(); jQuery(document).ready( function(){ jQuery('#anniversary').innerfade({ speed: 1000, timeout: 5000, type: 'sequence', }); });

    Read the article

  • jQuery selector for option tag value attribute returns null

    - by Ben
    Hello, I am trying to change the selected option in a select dropdown box with jQuery. I have it set so that it finds the hash tag at the end of the URL and based on that hash tag it changes the selected option in the select box. Most of my code is functional, it successfully finds the hash tag and executes the if statement that corresponds with it. However, when it goes to execute the "then" section of the statement when it goes to the selector for the option (which uses an attribute selector based on the value attribute of the option tag) it returns null. If figured this out with firebug, in the console it says that the selector is null. Here is my code: $(document).ready(function() { var $hash = window.location.hash if($hash == "#htmlcss") { $('option[value="HTML/CSS Coding"]').attr("selected","selected") } if($hash == "#php") { $('option[value="PHP Coding"]').attr("selected","selected") } if($hash == "#jscript") { $('option[value="Javascript and jQuery Coding"]').attr("selected","selected") } if($hash == "#improv") { $('option[value="General Website Improvements"]').attr("selected","selected") } if($hash == "#towp") { $('option[value="Website Conversion to Wordpress"]').attr("selected","selected") } if($hash == "#wptheme") { $('option[value="Wordpress Theme Design"]').attr("selected","selected") } if($hash == "#complete") { $('option[value="Complete Website Creation"]').attr("selected","selected") } if($hash == "#server") { $('option[value="Web Server Configuration"]').attr("selected","selected") } }); So to clarify, when I enter in a url that ends in the #php hash tag, for example, the desired action does not occur which would change the "PHP Coding" option to the selected one by using the "selected" html attribute however the selector for the particular option tag returns null. Is there a problem with my syntax or is my code not functioning in the way that I think it should? Thanks very much.

    Read the article

  • How to get multiple html() strings in jQuery

    - by Bryan
    I'm pretty new to jQuery... so far I'm impressed. But I encountered a situation today that is giving me trouble. I want to use .html() to get some raw text and use that in a selector, but that function only returns the first element. In the following structure, how can I get ALL of the "toggle_containerLG" divs to show when I click on the trigger "Some Header"? <h6 class="trigger active">Some Header</h6> <ul> <li><a href="#" class="trigger">Title One</a></li> <li><a href="#" class="trigger">Title Two</a></li> <li><a href="#" class="trigger">Title Three</a></li> </ul> <div class="toggle_containerLG" id='Title_One'></div> <!-- show these! --> <div class="toggle_containerLG" id='Title_Two'></div> <div class="toggle_containerLG" id='Title_Three'></div> <div class="toggle_containerLG" id='Title_Four'></div> <!-- not this one! --> I can't use $(".toggle_containerLG") because there are others I don't want to expand... I just want the ones listed under "Some Header". Seems like there should be an easy way to do it... and I'm just missing it because I don't know jQuery very well.

    Read the article

  • jQuery tokeninput plugin + passing id to another tokeninput url

    - by Elson Solano
    I am using a jquery plugin called jQuery Tokeninput http://loopj.com/jquery-tokeninput/ and I am having a logic issue. var country_id = ""; jQuery("#demo-input-prevent-duplicates").tokenInput(host+"/forms/campaign_location.php?action=country", { theme: "facebook", hintText: "Enter a Country...", placeholder: "Enter a Country...", preventDuplicates: true, onAdd: function(item) { country_id = item.id; }, onDelete: function(){ hideElements(); }, tokenDelimiter: "|", }); My question here is how would I pass the value of country_id to the parameter of the below code. I'm not seeing how to do this one on the jquery tokeninput documentation. jQuery("#targ_state").tokenInput(host+"/forms/campaign_location.php?action=stateorprovince&cid="+country_id, { theme: "facebook", preventDuplicates: true, hintText: "Enter a State or Province...", placeholder: "Enter a State or Province..." }); If you'll look on this part of the code, I am passing the country_id that was generated above on the "onAdd". This doesn't work though. jQuery("#targ_state").tokenInput(host+"/forms/campaign_location.php?action=stateorprovince&cid="+country_id .... How would I do that one? Your help would be greatly appreciated and of course, rewarded! Thanks! :-)

    Read the article

  • Jquery find behavior in firefox 3.5.9

    - by dragoon
    Hi, i have the following piece of HTML code on my page: <tr> <td> <div> <input type="hidden" name="test" value=""> <input autocomplete="off" class="ffb-input watermark"> <div class="ffb"> <div class="content"> </div> </div> </div> </td> </tr> In JavaScript I get the <tr> element using jquery and trying to search for input like this: tr.find('div input:hidden') but nothing is returned. When I'm using find like this: tr.find('div input[type=hidden]') Everything is working fine. What is the reason for such behavor? I observe this only in FireFox 3.5.9, not in 3.6.3, Jquery 1.4.2

    Read the article

  • Return value of a JQuery autocomplete using an array of objects as its source

    - by user2920430
    In a JQuery autocomplete which uses an array of objects as its source, can I display the label in the INPUT and later access the value? The default behavior is that the value is displayed in the INPUT after selection. In this case the values represent indexes to unique keys in rows in a table. <!doctype html> <html lang="en"> <head> <meta charset="utf-8"> <title>autocomplete demo</title> <link rel="stylesheet" href="http://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css"> <script src="http://code.jquery.com/jquery-1.9.1.js"></script> <script src="http://code.jquery.com/ui/1.10.3/jquery-ui.js"></script> </head> <body> <label for="autocomplete">Select a programming language: </label> <input id="autocomplete"> <script> $( "#autocomplete" ).autocomplete({ source: [ { label:"c++", value:1 }, { label: "java", value:2 }, { label: "javascript", value:3 } ] }); </script> </body> </html>

    Read the article

< Previous Page | 14 15 16 17 18 19 20 21 22 23 24 25  | Next Page >