Search Results

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

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

  • jQuery prevUntil() include start selector and end selecter

    - by Globalz
    I would like to select the start and end selector for the prevUntil() or nextUntil() jQuery selector methods. If i implement these methods now, it grabs everything between the two selectors given. i.e. $('p').prevUntil('h1') will not include the p and h1 element, only those between them. How could I also select the p and h1 elements as well as though between? Thanks!

    Read the article

  • jquery selector logical AND?

    - by taber
    In jQuery I'm trying to select only mount nodes where a and b's text values are 64 and "test" accordingly. I'd also like to fallback to 32 if no 64 and "test" exist. What I'm seeing with the code below though, is that the 32 mount is being returned instead of the 64. The XML: <thingses <thing <a32</a <-- note, a here is 32 and not 64 -- <other...</other <mountsample 1</mount <btest</b </thing <thing <a64</a <other...</other <mountsample 2</mount <btest</b </thing <thing <a64</a <other...</other <mountsample 3</mount <bunrelated</b </thing <thing <a128</a <other...</other <mountsample 4</mount <bunrelated</b </thing </thingses And unfortunately I don't have control over the XML as it comes from somewhere else. What I'm doing now is: var ret_val = ''; $data.find('thingses thing').each(function(i, node) { var $node = $(node), found_node = $node.find('b:first:is(test), a:first:is(64)').end().find('mount:first').text(); if(found_node) { ret_val = found_node; return; } found_node = $node.find('b:first:is(test), a:first:is(32)').end().find('mount:first').text(); if(found_node) { ret_val = found_node; return; } ret_val = 'not found'; }); // expected result is "sample 2", but if sample 2's parent "thing" was missing, the result would be "sample 1" alert(ret_val); For my ":is" selector I'm using: if(jQuery){ jQuery.expr[":"].is = function(obj, index, meta, stack){ return (obj.textContent || obj.innerText || $(obj).text() || "").toLowerCase() == meta[3].toLowerCase(); }; } There has to be a better way than how I'm doing it. I wish I could replace the "," with "AND" or something. :) Any help would be much appreciated. thanks!

    Read the article

  • jquery child selector problems

    - by codedude
    I have a basic website nav layout that looks like this: <li class="folder parent_folder"> <a href="#">Some Folder</a> <ul class="submenu"> <li class="file"><a href="#">An awesome file</a></li> <li class="file"><a href="#">An awesome file</a></li> <li class="file"><a href="#">An awesome file</a></li> <li class="file"><a href="#">An awesome file</a></li> <li class="file"><a href="#">An awesome file</a></li> <li class="file"><a href="#">An awesome file</a></li> </ul> I have several of these throughout the site's page. Using jquery, I'm trying to make it so that when you click "li.parent_folder" "ul.submenu" disappears and then reappears when you click "li.parent_folder" again. I can get it to do this but I have a problem. When I click on the "li.parent_folder" all the "ul.submenu" disapear instead of just the one that is the child of it. What would be the correct jquery code to accomplish this? (Oh, I'm using jquery ui also in this project What I have right now is this: $('li.parent_folder').click(function() { $('li.parent_folder ul.submenu').hide(); });

    Read the article

  • Does jQuery have a plugin to display a "message bar" like the Twitter "wrong password" bar at the to

    - by Jian Lin
    Twitter will pop down a message bar at the top of the screen say "Wrong password" and after 10 seconds, it will slide up and disappear. Chrome also shows "Do you want to save the password" message box using such a way. Does jQuery have a plug in to do that already? Does it also work in IE 6? Because usually, the display of relative to the viewport (using position: fixed) will not work on IE 6. thanks.

    Read the article

  • Do you know why introducing jquery ui autocomplete for my dropdown boxes is also changing my listbox

    - by oo
    I am trying to change my comboboxes to use autocomplete so i leverage the code listed here (which worked perfectly for my dropdowns) The issue is that i also on the same page have a listbox with the following code: <%= Html.ListBox("Cars", Model.BodyParts.Select( x => new SelectListItem { Text = x.Name, Value = x.Id, Selected = Model.CarsSelected.Any(y => y.Id == x.Id) } ))%> and it appears that the jquery ui code is changing this to a autocomplete dropdown as well (as opposed to keeping it as a multi select list box) any idea how to prevent this from happening? i literally am just using the exact code on this page <script type="text/javascript"> (function($) { $.widget("ui.combobox", { _create: function() { var self = this; var select = this.element.hide(); var input = $("<input>") .insertAfter(select) .autocomplete({ source: function(request, response) { var matcher = new RegExp(request.term, "i"); response(select.children("option").map(function() { var text = $(this).text(); if (!request.term || matcher.test(text)) return { id: $(this).val(), label: text.replace(new RegExp("(?![^&;]+;)(?!<[^<>]*)(" + request.term.replace(/([\^\$\(\)\[\]\{\}\*\.\+\?\|\\])/gi, "\\$1") + ")(?![^<>]*>)(?![^&;]+;)", "gi"), "<strong>$1</strong>"), value: text }; })); }, delay: 0, select: function(e, ui) { if (!ui.item) { // remove invalid value, as it didn't match anything $(this).val(""); return false; } $(this).focus(); select.val(ui.item.id); self._trigger("selected", null, { item: select.find("[value='" + ui.item.id + "']") }); }, minLength: 0 }) .addClass("ui-widget ui-widget-content ui-corner-left"); $("<button>&nbsp;</button>") .insertAfter(input) .button({ icons: { primary: "ui-icon-triangle-1-s" }, text: false }).removeClass("ui-corner-all") .addClass("ui-corner-right ui-button-icon") .position({ my: "left center", at: "right center", of: input, offset: "-1 0" }).css("top", "") .click(function() { // close if already visible if (input.autocomplete("widget").is(":visible")) { input.autocomplete("close"); return; } // pass empty string as value to search for, displaying all results input.autocomplete("search", ""); input.focus(); }); } }); })(jQuery); $(function() { $("select").combobox(); }); </script>

    Read the article

  • embed a jquery script after jquery is loaded by widget

    - by matthew k
    http://stackoverflow.com/a/6065421 was helpful to see how to confirm jquery has been loaded. my widget will need a class that was written using jquery. may i have some assistance on embedding this other class built using jquery? thank you, below is the snippet from the above link with my code added in the final portion as noted in the code comments: (function(window, document, version, callback) { var j, d; var loaded = false; if (!(j = window.jQuery) || version > j.fn.jquery || callback(j, loaded)) { var script = document.createElement("script"); script.type = "text/javascript"; script.src = "/media/jquery.js"; script.onload = script.onreadystatechange = function() { if (!loaded && (!(d = this.readyState) || d == "loaded" || d == "complete")) { callback((j = window.jQuery).noConflict(1), loaded = true); j(script).remove(); } }; document.documentElement.childNodes[0].appendChild(script) } })(window, document, "1.3", function($, jquery_loaded) { //my code added below var script_tag = document.createElement('script'); script_tag.setAttribute("type","text/javascript"); script_tag.setAttribute("src", "http://mysite.com/widget/slides.jquery.js"); (document.getElementsByTagName("head")[0] || document.documentElement).appendChild(script_tag); $('#slides').slides({}); //this line gives an error. }); right now, i am trying the following based on the response(s) provided to this question (line that throws error is noted with a comment): //this function is called after jquery being embedded has been confirmed. {mysite} placeholder is nonexistent in actual code. function main() { jQuery(document).ready(function($) { var css_link = $("<link>", { rel: "stylesheet", type: "text/css", href: "http://mysite/widget/widget.css" }); css_link.appendTo('head'); $('#crf_widget').after('<div id="crf_widget_container"></div>'); /******* Load HTML *******/ var jsonp_url = "http://mysite/widget.php?callback=?"; $.getJSON(jsonp_url, function(data) { $('#crf_widget_container').html(data); $('#category_sel').change(function(){ alert(this.value); }); $.getScript("http://mysite/widget/slides.jquery.js", function(data, textStatus, jqxhr) { alert(1); //fires ok $('#slides').slides({}); //errors }); }); }); }

    Read the article

  • 36 Hour Free Offer: jQuery Fundamentals Training

    - by ScottGu
    Pluralsight (a great .NET training company) is offering the opportunity to watch their jQuery Fundamentals course for free for the next 36 hours. The course is presented by the most excellent Dan Wahlin and contains 5 hours of great end to end content.  Pluralsight will be offering this jQuery Fundamentals course for free until Thursday evening (9pm PST). Pluralsight has about 100 other great training courses available similar to this one.  They recently launched a new subscription plan that allows you to watch all of their courses online starting from $29 a month.  They also offer a 10 day free trial option that you can use to try it out.  You can learn more about it here. Free jQuery 1.5 Visual Cheat Sheet While on the topic of jQuery, I wanted to link to one other useful resource to download if you are using jQuery – which is a free jQuery PDF “cheat sheet” for the jQuery 1.5 APIs. You can download it for free here. Hope this helps, Scott P.S. I am also now using Twitter for quick updates and to share links. Follow me at: twitter.com/scottgu

    Read the article

  • How to reference jQuery in SharePoint2010

    - by ybbest
    In normal asp.net development, in order to add jQuery to your solution you need to add the following script to your Master page. <script language=”javascript” type=”text/javascript” src=”Scripts/jquery-1.4.1.min.js”></script> There are not many differences in referencing jQuery in SharePoint2010; in fact you got quite a few ways to achieve this. The first thing you need to do is to deploy jQuery using SharePoint module template in Visual studio. Then you can choose one of the following ways of referencing jQuery. 1. Using a Delegate Control 2. in the master Page 3. Ad hoc (e.g. in a site page or web part) 4. Using a Custom Action (Can be used as Sandbox solution, you can find example here.) References: jquery How to bootstrap JQuery on every SharePoint page, even in the Sandbox Referencing Javascript Files with SharePoint 2010 Custom Actions using SciptSrc

    Read the article

  • Advantages of using pure JavaScript over JQuery

    - by Shivan Dragon
    What are the advantages of using Javascript-only versus using JQuery-only? I have limited experience with JavaScript and JQuery coding. I've added bits and snippets of each to HTML pages but I've mostly coded server-side stuff in other languages. I've noticed that while you can theoretically do the same things using either of the two approaches (and of course you can even mix 'em up in the same project) there seems to be a tendency to always start using JQuery from the very beginning no-matter what the project demands are. So I'm simply wondering, are there any punctual benefits to not use JQuery-only but instead to just use plain old JavaScript? I know this looks like a non-question because it can be said about it that "there's no definite answer" or "it can be debated for ever", but I'm actually hoping for punctual answers such as "You can do this in one approach and you cannot do it with the other". ==EDIT== As per scrwtp's comment, I'm not referring just to the DOM Handling part. My question is rather: JQuery is a library. For Javascript. What I find strange about this library as opposed to other libraries for other languages is that in JQyery's case it seems to be designed to be able to use it exclusively and not need to touch Javascript directly. This is as opposed to let's say Hibernate and SQL, where even though the library (or rather framework in this case, but I think the analogy still applies) takes the handle on A LOT of aspects, you still get to use SQL when using it, at least for some fringe cases. However in JQuery & Javascript case, you could do anything you do with Javascript using only JQuery (or at least that's how it seems to me).

    Read the article

  • How to associate jquery validation with only one button if there are many?

    - by Eyla
    Greetings, In my current project, I have gridview, search button, text box for search, text box, and submit button. -I should input string in the search box then click search button. -when click search button, it will retrieve all matches records then bind them to the view grid. -then when I click a record in the gridview, it should bound a field to the second text box. finally I should submit the page by clicking in submit button. where is the problem: -the problme that I'm using jquery validation plugin that will make second text box is required. -when I click search button will not allow postback until I write some thing in second text box. How can I make scond text box only do validation for required field only when click asp.net submit button. here is my code: <%@ Page Title="" Language="C#" MasterPageFile="~/Master.Master" AutoEventWireup="true" CodeBehind="WebForm1.aspx.cs" Inherits="IMAM_APPLICATION.WebForm1" %> <%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %> <asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server"> <script src="js/jquery-1.4.1-vsdoc.js" type="text/javascript"></script> <script src="js/jquery.validate.js" type="text/javascript"></script> <script src="js/js.js" type="text/javascript"></script> <script type="text/javascript"> $(document).ready(function() { $("#aspnetForm").validate({ // debug: true, rules: { "<%=txtFirstName.UniqueID %>": { required: true } }, errorElement: "mydiv", wrapper: "mydiv", // a wrapper around the error message errorPlacement: function(error, element) { offset = element.offset(); error.insertBefore(element) error.addClass('message'); // add a class to the wrapper error.css('position', 'absolute'); error.css('left', offset.left + element.outerWidth()); error.css('top', offset.top - (element.height() / 2)); } }); }) </script> <div id="mydiv"> <asp:GridView ID="GridView1" runat="server" style="position:absolute; top: 280px; left: 30px; height: 240px; width: 915px;" PageSize="5" onselectedindexchanged="GridView1_SelectedIndexChanged" AutoGenerateColumns="False" DataKeyNames="idcontact_info"> <Columns> <asp:CommandField ShowSelectButton="True" InsertVisible="False" ShowCancelButton="False" /> <asp:BoundField DataField="First_Name" HeaderText="First Name" /> <asp:BoundField AccessibleHeaderText="Midle Name" DataField="Midle_Name" /> <asp:BoundField DataField="Last_Name" HeaderText="Last Name" /> <asp:BoundField DataField="Phone_home" HeaderText="Phone Home" /> <asp:BoundField DataField="cell_home" HeaderText="Mobile Home" /> <asp:BoundField DataField="phone_work" HeaderText="Phone Work" /> <asp:BoundField DataField="cell_Work" HeaderText="Mobile Work" /> <asp:BoundField DataField="Email_Home" HeaderText="Personal Home" /> <asp:BoundField DataField="Email_work" HeaderText="Work Email" /> </Columns> </asp:GridView> <asp:ObjectDataSource ID="ObjectDataSource1" runat="server" DeleteMethod="Delete" InsertMethod="Insert" OldValuesParameterFormatString="original_{0}" SelectMethod="GetData" TypeName="IMAM_APPLICATION.DSContactTableAdapters.contact_infoTableAdapter" UpdateMethod="Update"> <DeleteParameters> <asp:Parameter Name="Original_idcontact_info" Type="Int32" /> </DeleteParameters> <UpdateParameters> <asp:Parameter Name="Title" Type="String" /> <asp:Parameter Name="First_Name" Type="String" /> <asp:Parameter Name="Midle_Name" Type="String" /> <asp:Parameter Name="Last_Name" Type="String" /> <asp:Parameter Name="Address1_Home" Type="String" /> <asp:Parameter Name="Address2_Home" Type="String" /> <asp:Parameter Name="City_Home" Type="String" /> <asp:Parameter Name="State_Home" Type="String" /> <asp:Parameter Name="Prov_Home" Type="String" /> <asp:Parameter Name="ZipCode_Home" Type="String" /> <asp:Parameter Name="Country_Home" Type="String" /> <asp:Parameter Name="Phone_home" Type="String" /> <asp:Parameter Name="Phone_Home_Ext" Type="String" /> <asp:Parameter Name="Cell_home" Type="String" /> <asp:Parameter Name="Fax_home" Type="String" /> <asp:Parameter Name="Email_Home" Type="String" /> <asp:Parameter Name="material_status" Type="String" /> <asp:Parameter Name="DateOfBrith" Type="String" /> <asp:Parameter Name="company" Type="String" /> <asp:Parameter Name="Work_Field" Type="String" /> <asp:Parameter Name="Occupation" Type="String" /> <asp:Parameter Name="sub_Occupation" Type="String" /> <asp:Parameter Name="Other" Type="String" /> <asp:Parameter Name="Address1_work" Type="String" /> <asp:Parameter Name="Address2_work" Type="String" /> <asp:Parameter Name="City_Work" Type="String" /> <asp:Parameter Name="State_Work" Type="String" /> <asp:Parameter Name="Prov_Work" Type="String" /> <asp:Parameter Name="ZipCode_Work" Type="String" /> <asp:Parameter Name="Country_Work" Type="String" /> <asp:Parameter Name="Phone_Work" Type="String" /> <asp:Parameter Name="Phone_Work_Ext" Type="String" /> <asp:Parameter Name="Cell_Work" Type="String" /> <asp:Parameter Name="Fax_Work" Type="String" /> <asp:Parameter Name="Email_work" Type="String" /> <asp:Parameter Name="WebSite" Type="String" /> <asp:Parameter Name="Note" Type="String" /> <asp:Parameter Name="Groups" Type="String" /> <asp:Parameter Name="InterPhoneHome" Type="Int32" /> <asp:Parameter Name="InterMobileHome" Type="Int32" /> <asp:Parameter Name="InterFaxHome" Type="Int32" /> <asp:Parameter Name="InterPhoneWork" Type="Int32" /> <asp:Parameter Name="InterMobileWork" Type="Int32" /> <asp:Parameter Name="InterFaxWork" Type="Int32" /> <asp:Parameter Name="rdoPhoneHome" Type="Int32" /> <asp:Parameter Name="rdoMobileHome" Type="Int32" /> <asp:Parameter Name="rdoEmailHome" Type="Int32" /> <asp:Parameter Name="rdoPhoneWork" Type="Int32" /> <asp:Parameter Name="rdoMobileWork" Type="Int32" /> <asp:Parameter Name="rdoEmailWork" Type="Int32" /> <asp:Parameter Name="locationHome" Type="Int32" /> <asp:Parameter Name="locationWork" Type="Int32" /> <asp:Parameter Name="Original_idcontact_info" Type="Int32" /> </UpdateParameters> <InsertParameters> <asp:Parameter Name="Title" Type="String" /> <asp:Parameter Name="First_Name" Type="String" /> <asp:Parameter Name="Midle_Name" Type="String" /> <asp:Parameter Name="Last_Name" Type="String" /> <asp:Parameter Name="Address1_Home" Type="String" /> <asp:Parameter Name="Address2_Home" Type="String" /> <asp:Parameter Name="City_Home" Type="String" /> <asp:Parameter Name="State_Home" Type="String" /> <asp:Parameter Name="Prov_Home" Type="String" /> <asp:Parameter Name="ZipCode_Home" Type="String" /> <asp:Parameter Name="Country_Home" Type="String" /> <asp:Parameter Name="Phone_home" Type="String" /> <asp:Parameter Name="Phone_Home_Ext" Type="String" /> <asp:Parameter Name="Cell_home" Type="String" /> <asp:Parameter Name="Fax_home" Type="String" /> <asp:Parameter Name="Email_Home" Type="String" /> <asp:Parameter Name="material_status" Type="String" /> <asp:Parameter Name="DateOfBrith" Type="String" /> <asp:Parameter Name="company" Type="String" /> <asp:Parameter Name="Work_Field" Type="String" /> <asp:Parameter Name="Occupation" Type="String" /> <asp:Parameter Name="sub_Occupation" Type="String" /> <asp:Parameter Name="Other" Type="String" /> <asp:Parameter Name="Address1_work" Type="String" /> <asp:Parameter Name="Address2_work" Type="String" /> <asp:Parameter Name="City_Work" Type="String" /> <asp:Parameter Name="State_Work" Type="String" /> <asp:Parameter Name="Prov_Work" Type="String" /> <asp:Parameter Name="ZipCode_Work" Type="String" /> <asp:Parameter Name="Country_Work" Type="String" /> <asp:Parameter Name="Phone_Work" Type="String" /> <asp:Parameter Name="Phone_Work_Ext" Type="String" /> <asp:Parameter Name="Cell_Work" Type="String" /> <asp:Parameter Name="Fax_Work" Type="String" /> <asp:Parameter Name="Email_work" Type="String" /> <asp:Parameter Name="WebSite" Type="String" /> <asp:Parameter Name="Note" Type="String" /> <asp:Parameter Name="Groups" Type="String" /> <asp:Parameter Name="InterPhoneHome" Type="Int32" /> <asp:Parameter Name="InterMobileHome" Type="Int32" /> <asp:Parameter Name="InterFaxHome" Type="Int32" /> <asp:Parameter Name="InterPhoneWork" Type="Int32" /> <asp:Parameter Name="InterMobileWork" Type="Int32" /> <asp:Parameter Name="InterFaxWork" Type="Int32" /> <asp:Parameter Name="rdoPhoneHome" Type="Int32" /> <asp:Parameter Name="rdoMobileHome" Type="Int32" /> <asp:Parameter Name="rdoEmailHome" Type="Int32" /> <asp:Parameter Name="rdoPhoneWork" Type="Int32" /> <asp:Parameter Name="rdoMobileWork" Type="Int32" /> <asp:Parameter Name="rdoEmailWork" Type="Int32" /> <asp:Parameter Name="locationHome" Type="Int32" /> <asp:Parameter Name="locationWork" Type="Int32" /> </InsertParameters> </asp:ObjectDataSource> <asp:TextBox ID="txtSearch" runat="server" style="position:absolute; top: 560px; left: 170px;" ></asp:TextBox> <asp:Button ID="btnSearch" runat="server" Text="Search" style="position:absolute; top: 555px; left: 375px;" CausesValidation="False" onclick="btnSearch_Click"/> <asp:Label ID="Label7" runat="server" Style="position: absolute; top: 630px; left: 85px;" Text="First Name"></asp:Label> <asp:TextBox ID="txtFirstName" runat="server" Style="top: 630px; left: 185px; position: absolute; height: 22px; width: 128px"></asp:TextBox> <asp:Button ID="submit" runat="server" Text="submit" /> </div> </asp:Content>

    Read the article

  • Change parent class of dom object via css selectors

    - by Le_Coeur
    Can i change parent class of some dom object on hover event via CSS selectors? For example I have such block: <span class="wBlock" > <span class="wText">Text</span> <span class="wLink"/> <\/span> and if i move mouse to span "wLink" span "wBlock" must be changed, and if i move out than it must be the same as at the begining .wLink{ padding-right:15px; background:url(/img/addlink.png) center right no-repeat; cursor:pointer; } .wText{ background-color: #1BE968; } It's something like this and if i move my cursor to plus text highlight must be changed to yellow

    Read the article

  • Use some CSS properties in many selectors without editing HTML or using JS

    - by OrB
    CSS: .bananaTrans { -moz-transition : all 1s ease-in-out; -webkit-transition: all 1s ease-in-out; transition : all 1s ease-in-out; } .bananaClass { color: yellow; } HTML: <div class="bananaClass">Banana Banana Banana</div> The objective is to make every element that has class "bananaClass" inherit the properties of "bananaTrans" without editing the HTML or using JavaScript. It ("bananaTrans") don't need exactly to be a class, it's just a bunch of properties to be used amongst other selectors.

    Read the article

  • Jquery Selector not working on Internet Explorer

    - by user284503
    Internet Explorer does not like my Jquery selector. Not sure if it's my weak Jquery skills or general Explorer strangeness. Here is the Code: $("#field_"+index+" #field_Label").val(); [div field_1] <input id="field_Label" //... you get the picture. to explain this.. I have a DIV labeled field_1, field_2.. etc.. Internet explorer appears to find the first iteration, but cannot find the second. Thank you all, and thanks to you stackoverflow. Is there a better way I should be doing this ?..

    Read the article

  • Using depends with the jQuery Validation plugin

    - by Glenn Slaven
    I've got a form with a bunch of textboxes that are disabled by default, then enabled by use of a checkbox next to each one. When enabled, the values in these textboxes are required to be a valid number, but when disabled they don't need a value (obviously). I'm using the jQuery Validation plugin to do this validation, but it doesn't seem to be doing what I expect. When I click the checkbox and disable the textbox, I still get the invalid field error despite the depends clause I've added to the rules (see code below). Oddly, what actually happens is that the error message shows for a split second then goes away. Here is a sample of the list of checkboxes & textboxes: <ul id="ItemList"> <li> <label for="OneSelected">One</label><input id="OneSelected" name="OneSelected" type="checkbox" value="true" /> <input name="OneSelected" type="hidden" value="false" /> <input disabled="disabled" id="OneValue" name="OneValue" type="text" /> </li> <li> <label for="TwoSelected">Two</label><input id="TwoSelected" name="TwoSelected" type="checkbox" value="true" /> <input name="TwoSelected" type="hidden" value="false" /> <input disabled="disabled" id="TwoValue" name="TwoValue" type="text" /> </li> </ul> And here is the jQuery code I'm using //Wire up the click event on the checkbox jQuery('#ItemList :checkbox').click(function(event) { var textBox = jQuery(this).siblings(':text'); textBox.valid(); if (!jQuery(this).attr("checked")) { textBox.attr('disabled', 'disabled'); textBox.val(''); } else { textBox.removeAttr('disabled'); textBox[0].focus(); } }); //Add the rules to each textbox jQuery('#ItemList :text').each(function(e) { jQuery(this).rules('add', { required: { depends: function(element) { return jQuery(element).siblings(':checkbox').attr('checked'); } }, number: { depends: function(element) { return jQuery(element).siblings(':checkbox').attr('checked'); } } }); }); Ignore the hidden field in each li it's there because I'm using asp.net MVC's Html.Checkbox method.

    Read the article

  • css nth-child(2n+1) repaint css after filtering out list items

    - by Michael
    I have a list of 20+ items. The background-color changes using the :nth-child(2n+1) selector. (ie. even item black, odd item white). When I click a button to filter out specific items using the jQuery Isotope plugin it adds a .isotope-hidden class to the items I want to filter out, which changes the position of the list item to 0,0 and opacity to 0. When this happens the remaining items are left with the original black/white background-colors, which are now no longer in order. Does anyone know a way to "repaint' the css using the :nth-child(2n+1) selector on the items that do not contain the .isotope-hidden class. I tried #element tr:not(.isotope-hidden):nth-child(2n+1) with no avail. Any help would be appreciated. Thank you.

    Read the article

  • JQueryTools live?

    - by deryck
    I´m using JQuery Tools http://flowplayer.org/tools/ in one big project. The issues is: When I load a page using ajax all this JQuery Tools stuff stop working. I know I have to re-bind the events or use jQuery.Live but I don´t know how to do this with JQuery Tools. I need methods like $(".element").overlay(...) $(".element").tabs(...) workin live after using jQuery.load() (Ajax) Anybody know how to do this please? Thanks.

    Read the article

  • how to parse jquery ajax xhtml response?

    - by steve
    Sorry if this has been posted many times. But I've tried many variations and it still doesn't work. The HTML comes back from the jquery AJAX call fine and I am trying to remove the header and footers from the response using: // none of these work for me $("#content", data); $("#content", $(data)); $(data).find("#content").html() I've breakpoint the response to verify the #content exists by inspected $(data) and using alert to print out the data's text. I've also try using "body" or "a" as selectors, but it always come back as undefined. I've read in this post that you can't pull in the full XHTML document: http://stackoverflow.com/questions/1050333/jquery-ajax-parse-response-text. But I can't find the answer's quote anymore, maybe it's outdated? Has anyone ran into this problem? Many thanks, Steve

    Read the article

  • Use jQuery to find div by background color

    - by maxsilver
    I'm trying to use jQuery to find the number of divs that are both visible, and have a background color of Green. (Normally I'd just add a class to the div, style it green, and check for that class in jQuery but in this instance, I can't actually change the markup of the page itself in any way) I currently have the visible div part working as : if( // if there are more than one visible div $('div.progressContainer:visible').length > 0 ){ I'd like to throw some kind of "and background color is green" selector in there. // not legit javascript if( // if there are more than one visible div, and its color is green $('div.progressContainer:visible[background-color:green]').length > 0 ){ Is it possible to do this?

    Read the article

  • jQuery + Not Selector

    - by Andrej
    Being a newbie to Javascript and jQuery, I am not sure whether this is not possible at all or I am just doing a completely dumb mistake: I am trying to hide a div on any click outside the div itself. I have simplified the code for demonstration purpose: HTML <html> <div class="tooltip"> Bla Bla Bla </div> </html> jQuery $('html:not(.tooltip)').click(function() { $('.tooltip').hide(); }); Demo http://jsfiddle.net/yCx6F/1/

    Read the article

  • How to get the Focus on one of Buttons of JQuery Dialog on ASP.NET MVC page?

    - by Rita
    Hi I have an ASP.NET MVC page(Registration). On loading the page, i am calling Jquery Dialog with Agree and Disagree buttons on that Dialog. 1). How to set the focus to Agree button by default? 2). How to disable the X (Close) Mark that is on Top right corner? (So that i don't want the user to close that dialog simply). Code: $("#dialog-confirm").dialog({ closeOnEscape: false, autoOpen: <%= ViewData["autoOpen"] %>, height: 400, width: 550, modal: true, buttons: { 'Disagree': function() { location.href = "/"; }, 'Agree': function() { $(this).dialog('close'); $(this).focus(); } }, beforeclose: function(event, ui) { var i = event.target.id; var j = 0; } }); Appreciate your responses. Thanks

    Read the article

  • Using jQuery UI with Rails

    - by Steve
    Hi, I am using jQuery in my Rails App. But when I try to turn my button to jQueryUI(Cupertino theme) button, it does not appear to be look like a jQuery UI Themed button. jQuery works because I am using it for Ajax and it works properly. I have pasted the code. Please tell me whether I am doing it wrongly <%=javascript_include_tag "jquery-1.4.2.min","jquery-ui-1.8.1.min","jquery.nivo.slider.pack","application"%> <input type = submit id = "add" name = "add" value = " Add " /> $("#add").button(); Thanks

    Read the article

  • Toggle a CSS selector using JQuery

    - by BEECHBOY707
    I am trying to toggle the display of a CSS selector (ie.to show/hide it) using JQuery. I successfully toggled the display of a div, but want to do this now with the CSS selector :after. The CSS selector is being used to create the arrow on the box. My attempt can be seen here: http://jsfiddle.net/beechboy707/7um9knxt/1/ Here is an extract from it showing the Jquery which is supposed to relate to the CSS selector: $("#supportus-button-1").click(function () { $(".supportus-button:after").toggle(); }); Many thanks for your help, Max

    Read the article

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