• How to avoid the scroll lock?

    Hello everyone . I'm trying to create an analogue of this or this plugin. Here is my code : $(window).scroll(function() { if($(this).scrollTop() >= $("#Page_1").offset().top/2){ var scroll_page_2 = $('#Page_2').offset().top; $(document).scrollTop(scroll_page_2); } if($(this).scrollTop() <= $("#Page_1").offset().top/2){ var scroll_page_1 = $('#Page_1').offset().top; $(document).scrollTop(scroll_page_1); } }); I have blocked  scrolling . An example is here . Well   with   my code   so   everything
  • Change touch area for slider control?

    I'm looking to increase the touch area of the slider control knob. More exactly, I want to add a padding of 10px around the knob. Is there a way to do that? Thanks!
  • How to combine jquery choosen and jquery multiselect plugin ?

    I need to combine jquery choosen and jquery multiselect plugin. Because i need to search as well as multiselect inside a dropdownlist or listbox in asp.net . Kindly help. If there is any other plugin of the combination of these two then kindly share it.
  • appendTo in 2 directions not working

    I set up this jsbin so you can see my problem.  My appendTo is working going to the right, but I need it to go to the left as well.  If I add the first 2 items to the right, clicking on those elements should bring them back to the left.  What am I doing wrong here? http://output.jsbin.com/fukegiweta Edit: Another question: Is there an easier/better way to do this?
  • Span Class String Replace On Click?

    I'm hoping someone might be able to shed some light on how I can replace a span class identifier using JQuery. The current code which does not work is as follows: $('#my-navicons a span class').text(function(index,text){ if (this.nextSibling.nodeValue = my-menu-openicon' { this.nextSibling.nodeValue = this.nextSibling.nodeValue.replace('my-menu-openicon', 'my-menu-closeicon'); } else { this.nextSibling.nodeValue = this.nextSibling.nodeValue.replace('my-menu-closeicon', 'my-menu-openicon'); } });
  • Dropdown menu problem

    Hii, I am trying to make a navigation bar with bootstrap classes but unable to do this, I want a dropdown menu where I want a sub menu under a button. please help me below is my entire code..         <nav class="navbar navbar-inverse" role="banner">             <div class="container">                 <div class="navbar-header">                     <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">                         <span class="sr-only">Toggle
  • Search one object from array comming from ajax result ?

    Hi, I'm trying to figure out which method of jQuery is used to find an object based on a property value of an object in a collection that comes from an Ajax call.  Here's what the collection looks like :
  • Responsive mobile menu with jquery mobile

    hello, After a lot of hours, I don`t know what to do anymore. I created a simple html page with a RMM menu. I want to use this with jquery mobile navigation. Still after a lot of tries and searching on google, i cannot find the perfect solution. //REPLACED THE CODE WITH JS FIDDLE https://jsfiddle.net/tk7kvr8d/ Can someone please tell me why after clicking on Upload foto button, the menu disappear?(I think it is a problem with the CSS)
  • Created jQuery-Mobile site and it works great, but my desktop version is no longer visible

    I created jQuery-Mobile site with Dreamweaver and it worked great, but my desktop version is no longer visible. Is there something I need to add to the code? This is the mobile site I created: http://hendrickscountysso.com/mobile.html This is the regular site:  http://hendrickscountysso.com/home.html I had to put my regular page back out there because I cannot afford to not have the desktop version unavailable. What do I need to add so my desktop site will show up??? Below is the code for my index.html
  • Sub Navigation in jquery ui

    Hello all, I need help. I'm looking to add sub-menu bars to my navigation in jquery ui. The only problem I'm left having, is that my text in my sub-menu is gold when the "about" tab is clicked. I would like for it to be the dark brown like the rest of my body, and how it is when another tab is selected.       Here is my jsfiddle. http://jsfiddle.net/gretcbkq/       This is using jquery ui Thanks for any and all help.
  • Need help selecting an element from a jquery response

    Hey Guys,  I am trying to get the value of a hidden input element from a jquery ajax response. The default value for the hidden element is  0. But after the jquery post has been completed the hidden input value attribute gets changed to a different number(by php) For some reason when I select the element from the data var (the response variable) and pass it into the html() function, it shows the value as 0 for the hidden input Below is my code... any help would be really appreciated!               
  • what have i missed

    What have i done wrong here http://n9mfk.info/newidea/mynow3.html Thanks Beau window.onload = function() {     var updateTimer;     var cp = ['N', 'NNE', 'NE', 'ENE', 'E', 'ESE', 'SE', 'SSE', 'S', 'SSW', 'SW', 'WSW', 'W', 'WNW', 'NW', 'NNW'];     $('[id$=Table]').DataTable({         'paging': false,         'searching': false,         'info': false,         'ordering': false     });         function updateTimeout() {         // Change the icon on the last update to show that there has been no update
  • jquery function for getting div inside row Table

    I have two jquery functions. They both should produce same result: showing a div. <script type="text/javascript"> jQuery(function ($) { $('a.lnk_showCheck').click(function (e) { e.preventDefault(); $('div', $(this).closest("td").next()).show(); }); }); </script> <script type="text/javascript"> function ShowCheck() { $('div', $(this).closest("td").next()).show(); }; </script> Basically, both functions find div inside a row of DataList and show it when LinkButton is clicked. <asp:DataList ID="MyDataList"
  • Header Buttons

    Hi, all, I am new to jQuery Mobile and I just started today. I am building a "mobile friendly" version of my desktop site and getting there very fast. However, I am not sure how to combat an issue I am having. I built my theme using the Theme Builder and I have a button in my header. All is working so far; however, the button is not centered vertically in the header and would like to know how I can get this to happen. I was considering adding some padding via CSS, but I am sure there is a quicker
  • How can I check if a select dropdown changed

    Hi. I am new in jQuery so here it is my question: How can I check if a select dropdown field changed. In a form I have some select dropdown fields, and I need to check if they were changed or not. I think I should use selectedIndex and defaultSelected but don't know exactly how. Could someone give me some tips? Thanks a lot.
  • jQuery UI Autocomplete Combobox _renderItem returns “TypeError: Item is undefined”

    When attempting to use a custom _renderItem, I keep receiving the error TypeError: item is undefined at .append(item.label) . This is using jQueryUI 1.11.4. I'm not sure why this is happening. From everything I've searched and read, this should work. Any help would be greatly appreciated.         (function($) {             $.widget("custom.combobox", {                 _create: function() {                     this.wrapper = $("<span>")                         .addClass("custom-combobox")                        
  • Add option depending on :visible items

    Hello!!! I'm asking for your help one more time I put a jsfiddle http://jsfiddle.net/ladobonline/ybu4axhy/10/ I'd like to add <option> in each <select> depending on the visible items. I mean: If I have categories: 1 and 2 and provinces: 1 I would like to offer just those options in <option> tags. Would you please give me a clue? (note I'm using 'data-*' to determinate which element belong to each category or province.... Jake!!! ;) THANK YOUUUU 
  • Making Timelinr Plugin Responsive

    I am attempting to make use of the Timelinr plugin for jquery as it does everything I need in my project, the only issue is it doesn't allow the images to be responsive. Has anyone tried to use this in the past and found a way to change the javascript to allow responsive elements? Any help is very much appreciated! Files code below: /* ---------------------------------- jQuery Timelinr 0.9.54 tested with jQuery v1.6+ Copyright 2011, CSSLab.cl Free under the MIT license. http://www.opensource.org/licenses/mit-license.php
  • Jquery keypress, keydown, keyup, input working.

    I have a requirement such that in a input text box, on each value entered a validation has to occur and after the 6th character is entered a hyphen has to get appended to the string. The solutions which I tried and the problems I encountered are listed below: keyup - It is working perfectly for detecting each character entered and appending a hyphen except that "it will send only a single key entry for a long key press". Ex: If I keep '9' pressing for a long time, the value in the text box will be
  • Callback gets fired with an alert function is present and it does not fire without an alert?

    When the alert function is present (shown below), the callback function gets fired and everything works. When the alert function is not present, the callback function never gets fired. function getTableData(tableName, startRow, endRow, callback) { CK.getData = $.getJSON("getTableData.php",{tN: tableName, sR: startRow, eR: endRow}, function(dataTable){}); alert("test"); CK.getData.done(function() { // load data inside table using an $.each function... callback(); // works only when the alert function
  • In jquery-1.11.0 , what is the purpose of jQuery.cache[elem[jQuery.expando]]?

    The document mode for my application has been recently upgraded  from IE8 to Edge. This is a simple change of content attribute for meta tag in _Head.cshtml. < meta http-equiv ="X-UA-Compatible" content ="IE=edge" /> The application is working as expected for most of the pages, but breaks where many dropdowns are rendered. The dropdown lists the record, however, does not let the user to select a value. In the console, you can find the error as: SCRIPT28: Out of stack space. This issue can be replicated
  • JQuery Toggle Slide Function

    I'm sure this is a simple fix, but I can't figure it out. When clicked, the following code it MEANT TO turn my hamburger to a 'X' and at the same time create a slide down toggle which opens "header-nav". Once clicked again (now on the 'X'), it turns back into a hamburger and the "header-nav" is slide back up and hidden away.... but... what it's actually doing is the opposite. It shows the 'X' when it's closed and the hamburger once it's opened. Hmm. Any ideas? HTML:     <div class="skip-links">                
  • License/Copyright of jQuery UI images/

    I created a theme with the ThemeRoller and downloaded it. In each .css or .js file are copyright informations included. But what about all the .png files in the "images/" folder? Are these icons and graphics also released under the MIT license? I cant find any informations for this case.
  • RGBA not working on IE7

    Hi, Can someone tell me how to make rgba work in IE7 and IE8? I want to make a transparent background-color to animate when hovering over an object. I don't know how to make it work in IE7 and IE8. This is my code; <script>     $(function(){         $("#live").hover(function() {             $(this).stop().animate({ backgroundColor: "rgba(88,62,70,0.5)"},1000)             $(this).find(".hover").stop().animate({opacity:"1"},1200)         },function() {             $(this).stop().animate({ backgroundColor:
  • Binding .colorbox with .on()

    The colorbox jQuery plug-in works fine in the base document. I have tried several times to place binding code in the displayed document which pulls in the content with colorbox using jQuery AJAX .load,  and have failed. I have googled for examples, found some, but they are too complicated with extraneous coding for me to copy and modify. I thought binding colorbox would be something simple. So, I just follow the .on() syntax with $(document).on(“click”,function(){  $('a.gallery').colorbox({rel:'gal'});
  • Passing ID into function instead of hard code

    Hi,  I manage to get it works by pressing a button and a value will load into a textbox. Here is my code <asp:TextBox ID="txtResult" runat="server"></asp:TextBox><br />        <input id="btn7" type="button" value="7" onclick="PassInput()" /> and my function is   function PassInput() {       $.ajax({          type: "POST",          url: "VB.aspx/GetInput",          data: '{name: "' + $("#btn7")[0].value + '" }',          contentType: "application/json; charset=utf-8",          dataType: "json",  
  • How to use these methods?

    This method is available in angular js. This method is also mentioned in this web page. ==>https://docs.angularjs.org/api/ng/function/angular.element But that does not explain how to use these methods. inheritedData(key)  please give me some examples. These days I am studying angularjs. I could not find any example.
  • Jquery Auto Complete UI not working

    Hi All,   I am working on a web application project where I need to add a autocomplete functionality in one of the fields. I am new to jquery, but I found a post in this forum where they shown how to do an autocomplete using js.   But when I run the code in my machine, its not working, I mean when I type anything into the field it is not showing suggestions below. I don't know where the problem is.   Please throw some light on it.   <!DOCTYPE html> <html lang="en"> <head> <script src="http://code.jquery.com/jquery-2.1.0.min.js"></script>
  • $('#filename2 input').val('skjsjdkjsdkskd') <---- Failed

    $('input#filename2').val('skjsjdkjsdkskd'); ---> Worked well. [Why did they fail????] $(#filename2').val('skjsjdkjsdkskd');  --> Failed $('#filename2 input').val('skjsjdkjsdkskd') <---- Failed
  • The same img tag works in Chrome, not IE. Why???

    <body>    <img src="img/I have a family.jpg"> The above code produces a good image in Chrome. But it doesn't in IE. Why??????
  • A href link won't fire, if included within another click event

    Good day, Can you please help me. I have a datatable. When a user click on a row for the first time, it will open a detail row under the top row. Within the detail row, I have a href hyperlink, and when this is clicked it supposed to link to another page. But the hyperlink didn't fire at all. To elaborate further, if the first column of a top row is clicked, then a detail-row will be displayed under it. In the detail row, there is defined a hyperlink to another page. My code snippet is below:  $('#tblTutors
  • Inline Form Field Edit

    http://jsfiddle.net/rv374kmt/1/ Im Trying to edit each form field  individually, on edit click the save is displaying and while it is displaying the hover funcitonality of class gear should be disabled and while hovering the each form field the edit should display for each  form field individually 
  • How to assign a data from $.get to a var, or read the responseText

    Hi, I've been looking everywhere for this... I've got this dict in JS -  { ranges: {"year 2013": ["01/01/2013", "31/12/2013"]} opens: 'left', format: 'dd/MM/yyyy', separator: ' to ', startDate: START_DATE, endDate: END_DATE, minDate: '01/01/2005', maxDate: '31/12/2023', }Now I'd like ranges to be dynamic and not hard coded so I managed to pull data using this request: $.get("accyears", function(data){data})I obviously can't put the whole thing in a variable as it's an object. Trying to set 'data'
  • Menu not initializing

    Hi. I am using a lot of jQuery UI in this project and haven't had issues like this before, so I don't know what's going on. I have a simple unordered list with list items, and I then apply the menu function. It looks just like in the jQuery UI Demo page for Menu. I can tell that it is partially working because when I inspect the UL element, I see new classes and other data applied. However, the LI elements are completely untouched. Here is what the item looks like in Firebug in Firefox: <ul id="test"
  • jQuery created a div. How to change proprety of this div?

    Hi All, I'm trying to make a multi window system. It's like each link the user click the jQuery create a div automatically and set id. As below: $(".link").click(function() { var value = $(this).attr("href"); var value_without = value.slice(1); if ($(value).length){  // check if the div exist alert("nao"); } else { $("#content").append( '<div id='+value_without+' class=panel><input type=button class=minimiza value="_"><button class=fecha>X</button>'+value_without+'</div>' ); $(value).draggable({
  • Problem replacing html text

    Hello I'm stuck with this. I'd like to give the user the chance to think if he is completely sure of delete his account before to do it. So, I put an <a> tag which calls the following script:  $(".editAccount a").on("click", function(e){       e.preventDefault();       var curr = $(".editAccount").html();       var r = $(".editAccount").html("<h3>ARE YOU COMPLETELY SURE OF DELETE YOUR ACCOUNT..</h3><div><a class='yes'>YES</a><a class='no'>NO</a></div>"); }); My idea is if he clicks on "NO" he "goes
  • how to hide the 'x' button in Autocomplete Jquery UI in IE11

    Hi,  how to hide the 'x' button in Auto-complete jQuery UI using  IE 11 as default browser  when i put the cursor inside the input Auto-complete jQuery UI a button 'x' appear in IE 11  problem just in IE 11  http://i.stack.imgur.com/RpAlp.png i use that css code but it s not working      .ui-autocomplete-loading::-ms-clear {        display: none!important;     }
  • How to avoid buttons being disappeard after resizing and dragging jQuery dialog

    I have a jQuery UI dialog here in  Jsfiddle  with the below properties set to true. draggable: true, resizable: true The issue is that the button is getting disappeared when i resize/drag the dialog, It looks like its jQuery UI's default behaviour. I would like to see the button still show even after resizing and dragging
  • understanding the usage of e inside carasoul.js

    hey guys i was just going through the code of carousel.js and i am a little bit confused , now we it comes to attaching events i ofte see code as follows ::  $('a').click(fuction(e){ if(e.target.targetNode == $(this)[0]) //do something }); I am still a bit confused , who is passing the e ? WHO really is passing that e inside the function ? also in the plugin code i see things like the below : Carousel.prototype.keydown = function (e) { if (/input|textarea/i.test(e.target.tagName)) return switch (e.which)
  • create a txt file with ajax and php

    Hey everyone, i want to write a Script which creates a txt file with some user entered variables. The communication between the script and my HTML Document with ajax works fine. But i have some problems with the creation of the file. Maybe someone find a small mistake in my script...  <?php <!-- SAVE POSTDATA PART--> $content = "test without variables"; $savename = "test.txt"; $file = fopen($savename, "w"); fwrite($file, $content); fclose($file); echo $savename; ?> And the JavaScript Part:  $("#mybutton").click(function(){
  • 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