• How to get the dynamic header text on respective link click using jquery?

    Hello Everyone,      I am facing problem with jquery. Kindly help me by seeing this jsfiddle once.  http://jsfiddle.net/Satish_Chandragiri/5Y9mG/111/ Here "sticky" is common with dynamic ids. On click of each sticky i want respective header value in alert message. here every header also having dynamic ids. eg. if u click on 1st sticky, i want  " testing compltd" in alert box,  on 2nd click, i want   "helo testing on notifiction" in alert box. etc Thanks in Advance Satish Chandragiri
  • window.onerror - Read console log & handle specific error

    Hi Guys, I'm trying to read the errors in the console log & then do something if a particular error is thrown that says 'Script error.' The following is some code I've pulled together and some commented pseudo code: function errorHandle() {     window.onerror = function(error, url, line, column, errorObj) {       alert('Error: '+error+' Script: '+url+' Line: '+line+' Column: '+column+' StackTrace: '+errorObj);       return true;     };   }   // Then use a try/catch block to handle it   try {    
  • can I put an alert in a jquery function like this

    $(function () {     alert('in func');     $("#img1").on({         mouseenter: function () {             $("img1",this).animate({                 top: 380             }, 1000)         },         mouseleave: function () {             $("img1",this).animate({                 top: 420             }, 1000)         }     })
  • check if node in JSON is empty

    Hi! I have a question about JSON in general, using jQuery with ajax.. What I try to do is to do is to display value based on URL from google api with geo codes.  The thing is that the result in JSON will not always have exactly the same number of nodes.. Let's say I want node number 3, it's fine as long as there exist such node and a vaule in the node.  https://maps.googleapis.com/maps/api/geocode/json?latlng=61.766008,61.197510 (have only two nodes, results[0].address_components[2].long_name and 
  • Optimal way to write if and else with minimum of repete?

    Hello! My questions if about the best way to write the following stuff most optimal with so few lines as posible? I provide an shorten example, in my case it should be much longer (A-Z). I hope you see what I trying to do. Thanks! var Alfa =  data.daily.[1].ico; // posible values A-Z var Beta =  data.daily.[2].ico; // posible values A-Z var Gamma = data.daily.[3].ico; // posible values A-Z if (Alfa == 'A') { $('.testAlfa').attr('data-icon', 'A'); }  else if (Alfa == 'B') { $('.testAlfa').attr('data-icon',
  • validate problem with IE11 Enterprise Mode

    i develop a corporate intranet site and i make good use of jQuery, jQuery.ui, and jQuery.validator. our standard browser is IE8... but we've been asked to do compatibility testing with IE11 (with Enterprise Mode, which emulates IE8) and Chrome. the result: - Chrome: FUNCIONA - IE8: FUNCIONA - IE11 without Enterprise Mode: FUNCIONA - IE11 with Enterprise Mode: jQuery Validation *NO* funciona yes, the only problem occurred in IE11 *with Enterprise Mode*. when i click on Submit, IE11 (Enterprise Mode)
  • Want to open a new page at the end of an animation

    I still haven't been able to figure this out through the jQuery directory, but I suspect the answer isn't that difficult; I have a picture that links to a new page in my html. When the user clicks the image, I want a black box to wipe across the image, then load a new page. I can do one or the other, but I don't know how to do both. Here is my code as it is currently written: <style> .wipe2right { background-color: #111; position: absolute; top: 0px; width: 228px; height: 158px;         right: 0px;
  • jQuery ajax call randomly leading to timeout in ios application using Verizon network. Server side coding is implemented using .NET handler.

    the sample code is as below. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head>     <title>Untitled Page</title>     <link href="css/jquery.mobile-1.3.0.css" rel="stylesheet" />     <script src="js/jquery-1.9.1.min.js" type="text/javascript"></script>     <script src="js/jquery-ui.js" type="text/javascript"></script>     <script src="js/jquery.mobile-1.3.0.js" type="text/javascript"></script>
  • Footer is jumping up and down due to accordion

    when i am clicking on accordion heading the footer is jumping up and down. how can i fix this issue. http://codepen.io/anon/pen/dyEBD
  • Has anyone managed to make a vertical accordion menu out of a databound asp:menu object?

    Has anyone managed to make a vertical accordion menu out of a databound asp:menu object? I would like to simply format the asp:menu object so that it does vertical accordion as a drill-down rather than fly-to-the-right with each drill-down. My page is asp.net with a databound asp:menu control, bound to a sitemapdatasource The implication is that while the menu renders as a set of embedded UL lists, this is not a manually generated and updated list, as I see in ALL examples on the internet. Here is
  • Dialog and hidden input fields

    I am experiencing a problem where the hidden input fields on my form disappear when a dialog box is opened. Even after the dialog is closed these fields are no longer on the form. Any ideas?
  • selectcreate event not firing

    Tried on Google Chrome and I cannot get the selectcreate event to fire. Using 1.4.3 jqm $('body').on('selectcreate', function() { alert('selectcreate triggered') }) <select data-native-menu="false">   <option>Option</option>   <option>Option</option> </select> Tried with an ID too. http://jsfiddle.net/8EcMC/35/
  • Jquery validate - button isn't restore default action

    Hello, I programming this form: http://www.longhorn.pl/symlink/index.php?task=register . Form is validating - if in form is bug, plugin create label error. Understand, when in form aren't have bug, plugin not allowed send form. As usual, browser console don't throw error :). <form id="registerForm" method="post" action="index.php?task=registerContinue"> <label>Podaj swój przyszły login (będzie potrzebny do zalogowania się do gry):</label> <input name="login" type="text"/> <label>Podaj swój
  • Images Folder Missing

    I'm trying to setup a new JQM project and have downloaded the latest stable CSS and js files for JQuery Mobile 1.4.3 and jquery 1.11.1. When I load my page, I get an error message on the console that it's unable to load the ajax-loader.gif file. It's looking for the images folder, but there's none to download. I've come across this before, so I know I need to download the full jQuery Mobile package and copy over the images folder, but why does the download page make no reference to this?  It tells
  • Use fancybox rel=“group” more than one time in same page its not working properly

    I have a list of articles and each article have a link "See full article". When user clicks in this link it will open a fancybox with all article content. And I want to navigate between news so Im using "rel="group" in my link, and it is working fine If I just have one rel="group".  But I have two design versions one for desktop and one for mobile, and Im couting my chars differently depending on wich version is. And in each version Im using "rel=group", so I use "rel=group" two times, because I
  • determine the element top

    Hi, I want to determine the top of my nav menu so when the user scrolls up and the nav reaches top position 40 then I want to change its position to fixed. I tried below code but didn't work. kindly help.. <script type="text/javascript"> $(document).ready(function() { $(window).scroll(function(){ // if($(window).scrollTop() > 80) if($("#nav").position().top <= 40) { $("#logoheader").hide( "drop", { direction: "down" }, "slow" ); $("#imageSmallLogo").show( "drop", { direction: "down" }, "slow" );
  • Question about uploading files using Jquery and sending to c# webmethod

    I need to upload files using a Jquery call. Anyone have success doing this.   $("#chkBtn1").click(function () {         var daFile = $("#file1").prop("files")[0];         // Append form data           var form_data = new FormData();         form_data.append("file", daFile);         $.ajax({             url: "testFileLoad1.aspx/processImages",             //dataType: 'json',             cache: false,             contentType: "multipart/form-data",             processData: false,             data:
  • autocomplete()

    Hello, with this code I try to use the autocomplete() and at the same time I try to get the selected value in p-element(id output), but it doesn't work, could you help please !!! <!doctype html> <html lang="en"> <head>   <meta charset="utf-8">   <title>jQuery UI Autocomplete - Default functionality</title>   <link rel="stylesheet" href="//code.jquery.com/ui/1.11.1/themes/smoothness/jquery-ui.css">   <script src="//code.jquery.com/jquery-1.10.2.js"></script>   <script src="//code.jquery.com/ui/1.11.1/jquery-ui.js"></script>
  • jquerymobile asp.net error

    Hi, i'm just trying jquery mobile on a tamplate solution in visual studio with defaut settings and i got this error when i click on a simple link : Erreur d’exécution JavaScript: Sys.InvalidOperationException: The PageRequestManager cannot be initialized more than once. anyone has ideas ??? thanks
  • Jquery validator module and function call after success

    I am not a jQery coder so I have some hard time to figure out how to use jQuery validate module, here is a code example:     jQuery.validator.setDefaults({ debug: true, success: "valid" }); $( "#myform" ).validate({ rules: { field: { required: true, email: true } } }); Now how can I submit my form after email field was validated? I know I have to use submitHandler but I don't know where and how? Here is my html: <form id="myform" method="post" action="test.php"> <label for="field">Email: *</label>
  • Update variable with ID name?

    Hi, I'm trying to cycle through the children elements of a parent and store their ID's in a variable. But I am having trouble updating the variable properly. It's overwriting the variable instead of adding to it. I was wondering if anyone could tell me where the error is in this. *edit* ok I think I solved it actually. Though it's crude... is this an acceptable method? $("#size4").click(function() {     var child;     var idList;     var newidList;         $(this).each(function() {             $(this).children().each(function()
  • Using jQuery

    hi all, I am new in web development, I have a problem with my Slider,  I just add new jQuery script for paragraph "read more"  but when I add this script to the template the slider images are not showing...  how can I solve this matter, please help me... thanks 
  • jQuery.event.trigger() : Pass the "event" object as an argument to "elem[type]()" call

    In function jQuery.event.trigger(), there is the following call (l. 4357 in jquery-2.1.1.js) : elem[ type ](); why not pass the event object as an argument ? This way : elem[ type ](event); This would provide the event object to the called function which is usually essential. In my case, this would allow to retrieve the namespace and thus adapt the action.
  • JQuery (tablesorter pagination) : Multiple pager controls

    Hi , I am using pagination plug-in from tablesorter.com . Every thing works fine . Has any one customized it to have multiple pager controls . My requirement is to have pagination control on top and bottom of the list page. Any help appreciated !! Thanks, Kiran
  • $.isJson(str);

    Why do not implement this function, that already exists in Prototype.js ? I actually don't know how to implement the script on the core, so, here is the snippet. This script implements $(object).isJSON, $.isJSON(object) and [String].isJSON() functions Feel free to fix any bug. (function ($) {     $.isJSON = function (json) {         json = json.replace(/\\["\\\/bfnrtu]/g, '@');         json = json.replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g, ']');         json = json.replace(/(?:^|:|,)(?:\s*\[)+/g, '');
  • jQuery .load() changes HTML attributes

    I made a chrome extension that loads videos from the subscription page on youtube into the same page with jQuery using the jQuery .load() function (and then does some checks on it to see if they're new but that's not what I'm here for). A regular video container's thumbnail's imagetag that isn't loaded with that function looks like this: <img data-thumb="//i.ytimg.com/vi_webp/BQOXkEU-0T0/mqdefault.webp" src="//i.ytimg.com/vi_webp/BQOXkEU-0T0/mqdefault.webp" alt="" aria-hidden="true" width="196" data-group-key="thumb-group-0">
  • Having difficulty trying to use the parent option in calling a function from the parent script.

    Hello, I have the following situation. I am attempting to use code already developed by someone else in .asp that works well. The asp script has a HTML element <div id="imageselected"></div> and a function shown as follows:     function updatethumb(){         $('#imageselected').load('do_updatethumb.asp?pid=<% =pid %>&center=<% =center %>');     } There is a 2nd script that calls the updatethumb() function doing a parent.updatethumb(). If I call the script from the address URL the first script works
  • How to duplicate the list bar(instance) in tabs?

    Hello members, I'm looking for a way to duplicate the list of tabs (only the visible part) and place it at the end of the tabs container. Basically, I will have two showed lists with same function, one above and one below the panel element). How can I do that? Thank you all in advance for your answers.
  • How to Load Items into an Infinite Loop

    Can you please take a look at  This Demo  let me know how I can load items into the  ul  list as an endless list. as you can see I have this list as following code but I need to add items again and again at the end of each time list. var item = $(".thumbnail").width(); var paddT = $(".thumbnail").css('margin-left'); item = item + 20; $(".leftslide").on("click", function () {     $(".list-inline").animate({         left: '-=' + item + 'px'     }, 300); }); $(".rightslide").on("click", function ()
  • Need help selecting <select> element

    Hey Guys. I am trying to select a <select> element by its name attribute, and prevent the form from submitting to itself if the value is equal to hour or minutes. I have wrote the following code but for some reason the console is giving me the following error message Error: Syntax error, unrecognized expression: select[name=*'weekday_time_start'] I am not sure what I am doing wrong. Below is the js fiddle to my work. Thanks http://jsfiddle.net/eldan88/m3ewayca/ <form method='post' action='#'> Weekday
  • append adds two rows in ie9

    Hi The following jquery code works in all browsers, except ie9. When resizing the browser window two rows of divs are displayed. But the height of the container is limited to the height of the content. What am i doing wrong? $(function() { var $window = $(window); var hasPrepended = false; var portDivs = ['<div class="port6"></div>','<div class="port5"></div>','<div class="port4"></div>',      '<div class="port3"></div>','<div class="port2"></div>','<div class="port1"></div>']; function portraits()
  • Inserting Text into <textarea>

    I'm creating a MySql 'query create box' trying to emulate the phpmyadmin() SQL routine. The  code shown below  works fine. What I would like is a critique on the efficiency of using all those <button> control statements. ie: <button type="button" class='sqlcontrols'  id="insert"  >INSERT</button>. Could I use the :active pseudo class selector in conjunction with class.sqlcontrols so that when the cursor clicks the button it is triggered. That way you would have only one line of code instead of 9
  • Problem with embedded browser

    Hi guys, we are trying to implement the snap.js jquery plugin in our Android app. This android app is a frame where a WEBVIEW java is embedded, and the "app" itself is a web page that we have specially designed to see properly inside this frame. The app is called RADICAL PADEL. The integration of snap.js is done and is right, but we have an issue, and it is that it behaves a bit strange when we drag the menu, and hide again. After repeating several times this "open-close" gesture and going up-down
  • jQuery UI Tooltip - Not Working

    I am trying to get the tooptip to work when I hover over a span tag, below is the code: <div class="rewards-points">       <div class="price-box">             <span class="price"> You will earn 50 points for purchasing this product!</span>       </div>       <script type="text/javascript">             jQuery(document).ready(function() {                   jQuery('.rewards-points .price').tooltip({content: 'The amount listed is the number of reward points you will earn by purchasing this product.&amp;nbsp;
  • Jquery Mobile 1.4.3 dialog display incorrect (the from page display dialog content) when press back button

    JQuery mobile dialog display incorrect after pressed back button. First time run Click open dialog button Clicked back button  Click open dialog button again  The dialog page content will copied to the from page after clicked back button. This will happen after added jquery-ui. It seems there is conflict between jquery mobile dialog and jquery ui. Or it will be normal if the dialog content is just several lines only. Here is my code:  1.From Page @{     Layout = null; } <!DOCTYPE html> <html> <head>
  • How to avoid execution of "accept" function on each droppable element?

    Hi, here is example, where each ".plan" can be moved into each ".unit". http://jsfiddle.net/3jvuqdu1/6/ Please drag ".plan#6" (F) from parent .unit (6) to its sibling (5) and see console log. "accept" is executed on each ".unit" - not only on covered by draggable element. Is it a bug or should I find new idea to restrict the set of calls of this function? In real situation I have about 500 such constructed droppables with quite complex "accept" method. It significantly slows down dragging, especially
  • jquery.on('focus') function does not allow selecting the text in input text field

    I have one input text field If I use jquery(document).on('focus',func) and call this.select() to select the text -> not work under IE11, works for FF31 If I use document.addEventListener('focus',func) and call this.select() to select the text -> work for both browser Test Environment IE11 64 bits under Win7 Firefox 31 under Win7 Test case http://jsfiddle.net/34e2h09t/22/ Did I make any mistake?
  • UI not working on IE 9 , 10 , 11

    HI ,     Our UI is working fine for IE 8 but not on IE 9 , 10 , 11. Some buttons and links are not working. When we click on links or buttons nothing happens and i get error as Unable to get property 'match' of undefined or null reference. No such method 'url' for tabs widget instance. This is what we have query verions in IE 8 .. let me know what to use for IE 9 , 10 ,11 For less or equal to IE8, we are using: jquery-1.3.2.min.js jquery-ui-1.7.2.custom.min.js FOR greater that IE 8 we are using :
  • Slideshow Works with Firefox, Safari and Chrome but not IE

    I have a slideshow that works on other browsers. However, it does not rotate between the images in IE. The code is below. Any suggestions or tips will be greatly appreciated. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><title>Slideshow</title><style>#slideshow{height:360px; width:776px; float:left}#slides{height:324px;
  • click() not firing on mobile version

    Hello guys, I have this project that I builded using pieces of code from various sources. It work perfectly on desktop version, but for mobile devices the fancybox does not work. Can anybody give some hint on what is wrong? Here's the fiddle:  http://jsfiddle.net/mk0tzhp4/44/ Any help help will be appreciated. Regards
  • Next Page

  • Announcements

  • The Basics of jQuery AJAX

    A step-by-step tutorial for those new to jQuery and wanting to use AJAX in their projects. Includes valuable information about troubleshooting using the console and understanding the request / response. http://jayblanchard.net/basics_of_jquery_ajax.html
  • jQuery Conference 2010: Boston Announcement

      The jQuery Project is very excited to announce the jQuery Conference 2010: Boston on October 16-17, 2010.  The conference will be held at the Hilton Boston Logan in Boston, Massachusetts.  The best part of this announcement is that Tickets are on sale now!  This venue is the largest that the project has worked with to date (Harvard Law School in ‘07, the MIT Stata Center in ‘08 and Microsoft New England Research Center in ‘09) and we expect to sell out very quickly. A brief synopsis of some of