Search Results

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

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

  • jquery :last missing multiple classes

    - by mickyjtwin
    I have an unordered list, and am using jquery to find the last ul and apply a class. jQuery("ul.class1:last").addClass("lastUi"); The html is as follows: <ul class="class1"></ul> <ul class="class1"></ul> This is working fine, however it has now changed in that another class is being added to the list so the html looks like: <ul class="class1"></ul> <ul class="class1 class2"></ul> <ul class="class1"></ul> <ul class="class1 class2"></ul> The jQuery code is now not picking up the last ul with both class1 and class2 as the last element and isn't adding the lastUI class.

    Read the article

  • Uncaught ReferenceError: jQuery is not defined "jquery-ui.js:338"

    - by Chad Sellers
    My jquery script reference are : <script src="http://code.jquery.com/jquery-latest.min.js" type="text/javascript"></script> <script src="http://code.jquery.com/ui/1.9.1/jquery-ui.js" type="text/javascript"></script> I'm using Chrome Version 23.0.1271.64 m - And I'm getting an error on line 338 })( jQuery ); //-- line 338 is highlighted This is a 1st for me and looking for answers.

    Read the article

  • Gravity Forms not loading under https, jQuery is not defined

    - by cmykrgbb
    I am using Gravity Forms on my Wordpress site, and so far so good. The problem is I have made the page secure (https/SSL), and this is making the form not to work. It looks like the issue is how the site is trying to load jQuery. There are 23 JS errors on the page, which seem to be due to a failed jQuery load "Uncaught ReferenceError: jQuery is not defined". If I go to the page where the source is trying to pull the jQuery file, you'll see the error:https://code.jquery.com/jquery-1.7.1.min.js?ver=3.4.2 Screenshot of the error: https://www.evernote.com/shard/s212/sh/326f95d6-a498-4c33-b413-7e968225cc79/c2e380ed0fa02a913f712005c8301185 And this screenshot is the reference in the page source: https://www.evernote.com/shard/s212/sh/ae547962-c017-4321-90a2-c51433e59262/124ae116f2b803771f4eb36c90b5a524 So I have been told I'd want to look into that - that's where the ultimate issue is, but I don't really know what to do next. Is it failing because of Gravity Forms, the HTTPS plugin from Wordpress, my SSL certificate...? Thanks in advance!

    Read the article

  • Creating and Using a jQuery Plug-in in ASP.NET Web Forms

    - by bipinjoshi
    Developers often resort to code reuse techniques in their projects. As far as ASP.NET framework server side programming is concerned classes, class libraries, components, custom server controls and user controls are popular code reuse techniques. Modern ASP.NET web applications no longer restrict themselves only to server side programming. They also make use of client side scripting to render rich web forms. No wonder that Microsoft Visual Studio 2010 includes jQuery library by default as a part of newly created web site. If you are using jQuery for client side scripting then one way to reuse your client side code is to create a jQuery plug-in. Creating a plug-in allows you to bundle your reusable jQuery code in a neat way and then reuse it across web forms. In this article you will learn how to create a simple jQuery plug-in from scratch. You will also learn about certain guidelines that help you build professional jQuery plug-ins.http://www.bipinjoshi.net/articles/aae84a03-b4a8-477d-b087-5b7f42935220.aspx 

    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: $(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

  • <optgroup> Not working in jQuery Dropdown

    - by Santhosh Kumar
    I have a asp:dropdownlist which i have changed to jQuery multiselect. I have to group the data inside the dropdown. I am grouping this in runtime.If it is a normal asp dropdown its working. When applying jquery Multiselect its dosen't. Source: <link rel="stylesheet" type="text/css" href="Styles/jquery.multiselect.css" /> <link rel="stylesheet" type="text/css" href="Styles/jquery.multiselect.filter.css" /> <link rel="stylesheet" type="text/css" href="Styles/style.css" /> <link rel="stylesheet" type="text/css" href="Styles/prettify.css" /> <%--<script src="Scripts/jquery-1.4.1.min.js" type="text/javascript"></script>--%> <script src="Scripts/jquery-1.4.1.js" type="text/javascript"></script> <link rel="stylesheet" type="text/css" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1/themes/ui-lightness/jquery-ui.css" /> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.js"></script> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1/jquery-ui.min.js"></script> <script type="text/javascript" src="Scripts/jquery.multiselect.js"></script> <script type="text/javascript" src="Scripts/jquery.multiselect.filter.js"></script> <script type="text/javascript" src="Scripts/prettify.js"></script> <script type="text/javascript"> $(document).ready(function () { //Create groups for dropdown list $("option[classification='LessThanFive']").wrapAll("<optgroup label='Less Than Five' />"); $("option[classification='GreaterThanFive']").wrapAll("<optgroup label='Greater Than five' />"); }); </script> <asp:DropDownList ID="MobileData" runat="server" OnDataBound="ddl_DataBound"> </asp:DropDownList> //Code Behind: protected void ddl_DataBound(object sender, EventArgs e) { foreach (ListItem item in ((DropDownList)sender).Items) { if (System.Int32.Parse(item.Value) < 2) item.Attributes.Add("classification", "LessThanFive"); else item.Attributes.Add("classification", "GreaterThanFive"); } } protected void Page_Load(object sender, EventArgs e) { ListItemCollection list = new ListItemCollection(); list.Add(new ListItem("1", "1")); list.Add(new ListItem("2", "2")); list.Add(new ListItem("3", "3")); list.Add(new ListItem("4", "4")); list.Add(new ListItem("5", "5")); list.Add(new ListItem("6", "6")); list.Add(new ListItem("7", "7")); list.Add(new ListItem("8", "8")); list.Add(new ListItem("9", "9")); list.Add(new ListItem("10", "10")); MobileData.DataSource = list; MobileData.DataBind(); } Where i'm wrong?

    Read the article

  • Parse HTML with CSS or XPath selectors?

    - by ovolko
    My goal is to parse HTML with lxml, which supports both XPath and CSS selectors. I can tie my model properties either to CSS or XPath, but I'm not sure which one would be the best, e.g. less fuss when HTML layout is changed, simpler expressions, greater extraction speed. What would you choose in such a situation?

    Read the article

  • Conditional Statement as Hierarchy jQuery

    - by Jacob Lowe
    Is there a way to make jQuery use objects in a conditional statement as an object in a hierarchy. For Example, I want to validate that something exist then tell it to do something just using the this selector. Like this if ($(".tnImg").length) { //i have to declare what object I am targeting here to get this to work $(this).animate({ opacity: 0.5, }, 200 ); } Is there a way to get jQuery to do this? I guess theres not a huge benefit but i still am curious

    Read the article

  • JQuery select text next to an input checkbox?

    - by Rosdi
    Using JQuery, is there a simple way to select the text immediately after a checkbox? <li>bleh..</li> <li> <input type="checkbox" id="cbx1" value="10" />&nbsp;Very important text. </li> <li>bleh..</li> I want to use jquery to select that "Very important text." minus &nbsp;

    Read the article

  • Why build Javascript functions as JQuery plugins?

    - by Mohammad
    I've seen alot of JQuery implementations of existent JavaScript functions that merely wrap the JavaScript code in a JQuery wrapper and don't actually rely on any of JQuery's base for their operation. What are the benefits of using Javascript as a JQuery plugin? If there are none is there a speed loss to use a JQuery plugin that could have easily been implemented outside the wrapper just as well? Many thanks in advance (just trying to learn something here).

    Read the article

  • jQuery: Selector confusion

    - by JamesBrownIsDead
    What is wrong with this jQuery selector? $("#masterHeaderMenu.masterHeaderMenuButton a:first") I'm intending to select the first anchor tag that is a child of an element whose class is "masterHeaderMenuButton", itself a child of the element with an "id" attribute value of "masterHeaderMenu". Can't I do this in jQuery?

    Read the article

  • Descendent or self selector in jQuery

    - by tttppp
    I want to search for all elements with class needle in all elements returned by jQuery('.haystack') and have tried jQuery('.haystack .needle'), but this doesn't seem to pick up the case where an element has both classes. Is there a selector that will do this?

    Read the article

  • jQuery detect visible but hidden elements

    - by IP
    This seems like it should be fairly easy - but I can't find the right selector for it According to the docs (http://api.jquery.com/hidden-selector/ and http://api.jquery.com/visible-selector/)... Elements can be considered hidden for several reasons: An ancestor element is hidden, so the element is not shown on the page. What I want to detect is "this element is visible, but is contained in a hidden parent". Ie, if I made the parent visible, this element would also be visible.

    Read the article

  • How to I add a JQuery locators to Selenium Remote Control

    - by danswain
    Hi, 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 selectors in Selenium. I've googled it, but can't find any articles that seem to work for me. Could anyone provide a comprehensive guide on how to use JQuery syntax to extract doc elements and their respective values out of selenium. I'm using C# to write my selenium tests, so if any examples could be from a C# perspective that'd be great. Thanks

    Read the article

  • Jquery .text() call returns null?

    - by Alex
    Hey all, I'm practicing Jquery and I've written this simple Jquery statement: var someText = $("table tr td").text(); Should this not return all text of td elements found within tr's that are found within tables? How do I fix this? Currently when I run this, it says that table tr td is null, but I have a table on the page I'm testing on. Thanks!

    Read the article

  • newbie in Jquery (including but no result)

    - by Negin
    I have this code: <html> <head> </head> <body> <form method='post'> <link type="text/css" href="css/themename/jquery-ui-1.8.14.custom.css" rel="Stylesheet" /> <script type="text/javascript" src="js/jquery-1.4.4.min.js"></script> <script type="text/javascript" src="js/jquery-ui-1.8.14.custom.min.js"></script> <style> #feedback { font-size: 1.4em; } #selectable .ui-selecting { background: #FECA40; } #selectable .ui-selected { background: #F39814; color: white; } #selectable { list-style-type: none; margin: 0; padding: 0; width: 60%; } #selectable li { margin: 3px; padding: 0.4em; font-size: 1.4em; height: 18px; } </style> <script> $(function() { $( "#selectable" ).selectable(); }); </script> <div class="demo"> <ol id="selectable"> <li class="ui-widget-content">Item 1</li> <li class="ui-widget-content">Item 2</li> <li class="ui-widget-content">Item 3</li> </ol> </div><!-- End demo --> <div class="demo-description" style="display: none; "> <p>Enable a DOM element (or group of elements) to be selectable. Draw a box with your cursor to select items. Hold down the Ctrl key to make multiple non-adjacent selections. </p> </div><!-- End demo-description --> </form> </body> </html> I downloaded the jquery but it has no result I used this site: http://jqueryui.com/demos/selectable/#event-create what is wrong here?

    Read the article

  • How do I keep child elements together with parent jQuery sortable.

    - by unknowndomain
    I have a list of items like this... <ol> <li> <span></span> <img src="image.png" /> <p>Image Caption</p> </li> </ol> And I want to be able to sort the LI's but not the sub elements, they should just move with their parent. I am using the jQuery to do that... $('ol li').sortable({ 'cursor': 'move' }); And its working but not moving the whole lot just the element you clicked i.e. the <p>, <img> or <span> I can't figure out how to solve this so I looked about and found an option called 'items': '> li' which was recommended but upon using this nothing drags any more but using firebug + jquery plugin I can see there is a sortable on the <li> still. Not sure what to do, example here: http://clareshilland.unknowndomain.co.uk/ Press ctrl+l to login. Enter the login details: Username: clarePassword: demo Select 'edit' from under then 'image' portion of the menu. The sortables should be those polaroids. Thanks in advance, another one I've been banging my head on the table with.

    Read the article

  • jQuery HOW TO?? pass additional parameters to success callback for $.ajax call ?

    - by dotnetgeek
    Hello jQuery Ninjas! I am trying, in vain it seems, to be able to pass additional parameters back to the success callback method that I have created for a successful ajax call. A little background. I have a page with a number of dynamically created textbox / selectbox pairs. Each pair having a dynamically assigned unique name such as name="unique-pair-1_txt-url" and name="unique-pair-1_selectBox" then the second pair has the same but the prefix is different. In an effort to reuse code, I have crafted the callback to take the data and a reference to the selectbox. However when the callback is fired the reference to the selectbox comes back as 'undefined'. I read here that it should be doable. I have even tried taking advantage of the 'context' option but still nothing. Here is the script block that I am trying to use: <script type="text/javascript" language="javascript"> $j = jQuery.noConflict(); function getImages(urlValue, selectBox) { $j.ajax({ type: "GET", url: $j(urlValue).val(), dataType: "jsonp", context: selectBox, success:function(data){ loadImagesInSelect(data, $j(this)) } , error:function (xhr, ajaxOptions, thrownError) { alert(xhr.status); alert(thrownError); } }); } function loadImagesInSelect(data, selectBox) { //var select = $j('[name=single_input.<?cs var:op_unique_name ?>.selImageList]'); var select = selectBox; select.empty(); $j(data).each(function() { var theValue = $j(this)[0]["@value"]; var theId = $j(this)[0]["@name"]; select.append("<option value='" + theId + "'>" + theValue + "</option>"); }); select.children(":first").attr("selected", true); } From what I have read, I feel I am close but I just cant put my finger on the missing link. Please help in your typical ninja stealthy ways. TIA

    Read the article

  • Accessing Element Count and Values Within a Hidden Div

    - by Tegan Snyder
    I'm having trouble grabbing the TR count in JQuery of a table that inside a DIV set to be hidden. Here is an example: <div id="questions" style="display: none;"> <table id="tbl_questions"> <thead> <tr> <th>Question</th> <th>Weight</th> </tr> </thead> <tbody> <tr id="q0"> <td id="td_question0">Some Question 0</td> <td id="td_wieght0">Some Weight 0</td> </tr> <tr id="q1"> <td id="td_question1">Some Question 1</td> <td id="td_wieght1">Some Weight 1</td> </tr> </tbody> </table> </div> Note the table is within the containing div. It's set to display: none. When I try to run this JQuery code it returns 0. var question_count = $("#tbl_questions> tr").size(); alert(question_count); Any ideas? I'm try to locate the count so I can then build an array of each question and weight in the table. Since the ID's provide me with an index this should be simple, but is the fact that it is contained in a hidden DIV going to be a problem just as the above question? Thanks, Tegan Snyder

    Read the article

  • Implementing History Support using jQuery for AJAX websites built on asp.net AJAX

    - by anil.kasalanati
    Problem Statement: Most modern day website use AJAX for page navigation and gone are the days of complete HTTP redirection so it is imperative that we support back and forward buttons on the browser so that end users navigation is not broken. In this article we discuss about solutions which are already available and problems with them. Microsoft History Support: Post .Net 3.5 sp1 Microsoft’s Script manager supports history for websites using Update panels. This is achieved by enabling the ENABLE HISTORY property for the script manager and then the event “Page_Browser_Navigate” needs to be handled. So whenever the browser buttons are clicked the event is fired and the application can write code to do the navigation. The following articles provide good tutorials on how to do that http://www.asp.net/aspnet-in-net-35-sp1/videos/introduction-to-aspnet-ajax-history http://www.codeproject.com/KB/aspnet/ajaxhistorymanagement.aspx And Microsoft api internally creates an IFrame and changes the bookmark of the url. Unfortunately this has a bug and it does not work in Ie6 and 7 which are the major browsers but it works in ie8 and Firefox. And Microsoft has apparently fixed this bug in .Net 4.0. Following is the blog http://weblogs.asp.net/joshclose/archive/2008/11/11/asp-net-ajax-addhistorypoint-bug.aspx For solutions which are still running on .net 3.5 sp1 there is no solution which Microsoft offers so there is  are two way to solve this o   Disable the back button. o   Develop custom solution.   Disable back button Even though this might look like a very simple thing to do there are issues around doing this  because there is no event which can be manipulated from the javascript. The browser does not provide an api to do this. So most of the technical solution on internet offer work arounds like doing a history.forward(1) so that even if the user clicks a back button the destination page redirects the user to the original page. This is not a good customer experience and does not work for asp.net website where there are different views in the same page. There are other ways around detecting the window unload events and writing code there. So there are 2 events onbeforeUnload and onUnload and we can write code to show a confirmation message to the user. If we write code in onUnLoad then we can only show a message but it is too late to stop the navigation. And if we write on onBeforeUnLoad we can stop the navigation if the user clicks cancel but this event would be triggered for all AJAX calls and hyperlinks where the href is anything other than #. We can do this but the website has to be checked properly to ensure there are no links where href is not # otherwise the user would see a popup message saying “you are leaving the website”. Believe me after doing a lot of research on the back button disable I found it easier to support it rather than disabling the button. So I am going to discuss a solution which work  using jQuery with some tweaking. Custom Solution JQuery already provides an api to manage the history of a AJAX website - http://plugins.jquery.com/project/history We need to integrate this with Microsoft Page request manager so that both of them work in tandem. The page state is maintained in the cookie so that it can be passed to the server and I used jQuery cookie plug in for that – http://plugins.jquery.com/node/1386/release Firstly when the page loads there is a need to hook up all the events on the page which needs to cause browser history and following is the code to that. jQuery(document).ready(function() {             // Initialize history plugin.             // The callback is called at once by present location.hash.             jQuery.history.init(pageload);               // set onlick event for buttons             jQuery("a[@rel='history']").click(function() {                 //                 var hash = this.page;                 hash = hash.replace(/^.*#/, '');                 isAsyncPostBack = true;                 // moves to a new page.                 // pageload is called at once.                 jQuery.history.load(hash);                 return true;             });         }); The above scripts basically gets all the DOM objects which have the attribute rel=”history” and add the event. In our test page we have the link button  which has the attribute rel set to history. <asp:LinkButton ID="Previous" rel="history" runat="server" onclick="PreviousOnClick">Previous</asp:LinkButton> <asp:LinkButton ID="AsyncPostBack" rel="history" runat="server" onclick="NextOnClick">Next</asp:LinkButton> <asp:LinkButton ID="HistoryLinkButton" runat="server" style="display:none" onclick="HistoryOnClick"></asp:LinkButton>   And you can see that there is an hidden HistoryLinkButton which used to send a sever side postback in case of browser back or previous buttons. And note that we need to use display:none and not visible= false because asp.net AJAX would disallow any post backs if visible=false. And in general the pageload event get executed on the client side when a back or forward is pressed and the function is shown below function pageload(hash) {                   if (hash) {                         if (!isAsyncPostBack) {                           jQuery.cookie("page", hash);                     __doPostBack("HistoryLinkButton", "");                 }                isAsyncPostBack = false;                             } else {                 // start page             jQuery("#load").empty();             }         }   As you can see in case there is an hash in the url we are basically do an asp.net AJAX post back using the following statement __doPostBack("HistoryLinkButton", ""); So whenever the user clicks back or forward the post back happens using the event statement we provide and Previous event code is invoked in the code behind.  We need to have the code to use the pageId present in the url to change the page content. And there is an important thing to note – because the hash is worked out using the pageId’s there is a need to recalculate the hash after every AJAX post back so following code is plugged in function ReWorkHash() {             jQuery("a[@rel='history']").unbind("click");             jQuery("a[@rel='history']").click(function() {                 //                 var hash = jQuery(this).attr("page");                 hash = hash.replace(/^.*#/, '');                 jQuery.cookie("page", hash);                 isAsyncPostBack = true;                                   // moves to a new page.                 // pageload is called at once.                 jQuery.history.load(hash);                 return true;             });        }   This code is executed from the code behind using ScriptManager RegisterClientScriptBlock as shown below –       ScriptManager.RegisterClientScriptBlock(this, typeof(_Default), "Recalculater", "ReWorkHash();", true);   A sample application is available to be downloaded at the following location – http://techconsulting.vpscustomer.com/Source/HistoryTest.zip And a working sample is available at – http://techconsulting.vpscustomer.com/Samples/Default.aspx

    Read the article

  • Jquery selectors by CSS class in IE is really slow--workarounds?

    - by Sam Lee
    I have a web app where I have several elements with class="classA". I want to select and apply a function to all of them. I am doing the obvious thing, which is $(".classA").each(function () { ... }). This works just fine in Chrome/Safari/Firefox but is really slow in IE. It turns out IE has serious performance issues when selecting things by CSS class in jQuery. I was wondering if anyone has suggestions on good ways to deal with this. I can't use ID selectors because there can be multiple DOM elements I want to select.

    Read the article

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