• How save all changes in local storage?

    I'm trying to create an editable listview. You can add and eliminate elements of the list. Each element have a group of elements that you can see if you click on each element. How can I save all the changes of the list in local storage? I need save the changes of the listview (add/eliminate items) and the the data of the all the inputs text that are inside of each item of the list. here is my code: http://jsfiddle.net/juank_romero/hA8Ps/11/ Thanks for your help :)
  • Created a cookie but it is not seen unless the page is refreshed.

    I have a small project, 5 pages, 1 front page, 4 sub-pages. I'm using jquery mobile. On the frontpage, I have a cookie being created to control a pop-up that shows for the fist time user. The problem is if a user navigates to one of the sub pages and back to the front page, the cookie is not seen and the prompt is shown again. Here is the code and the popup. http://jsfiddle.net/afP8D/. The cookie works if the user refreshes but the native way that jQuery navigates pages doesn't seem to re-run code.
  • Issue on Using jQuey load function

    can you please take a look at this ajax load() function Demo and let me know why I am not able to load data from the URL into the divs Here is the code I am using: <div id="result"></div> <div id="page"></div> $('#result').load('ajax/http://www.fifa.com/worldcup/index.html .mu-m'); $('#page').load('ajax/http://www.fifa.com/worldcup/index.html'); but I am getting this error: Failed to load resource: the server responded with a status of 404 (NOT FOUND)
  • static div as popup in single page jqm cordova app

    I am new to jquery and have a very simple single page JQM on Cordova(PhoneGap) app I'm "prototyping". I am trying to invoke a div as popup . I have popup div defined as: <div  id="myPopup" data-dismissible="false" data-role="popup" data-footer="home_footer">   <p>This is a simple popup test.</p>  </div> Invocation of popup is doen here:   <a  id="PressMe" onclick='invokePopup();' >popup</a> invokePopup=function() { $("#myPopup").popup("open"); } invokePopup function doesn't work.  Any suggestions
  • Need help selecting numbers only in a div element

    Hey Guys. I have a quick question. I am trying to select a float in a div element that also contains a string. Is there a way I can filter so it just get the number? Another alternative is to wrap the floating number in a separate element, but I would rather use jQuery to filter out the text so it can get the number. Below is my HTML code <div id="grand_total" class="totals">Grand Total = $7.57</div> $('#tip').change(function() {     var $tip = $('#tip').val();     var $total_amount = $('#grand_total').text()
  • Datepicker when set date to below 100 resets to 1900

    When i make a new date object with say for example 03/03/03, the date get set to 2003 in the drop down and when i try setting the date range or anything of the sort it changes automatically to 1903. I set the range from say 0 to 2014 by using any and all ways of setting the ranges and whenever i go to below 100 on the dropdown i get a value of 19** in the value menu for the date of the year. I dont know how to change this or if im just missing something would really appreciate the help. code for
  • Generating content with SimpleModal plugin

    Hi. I’m trying to use simplemodal (http://efimov.ws/assets/files/develop/11/modal/basic/index.html ) but I can't get the modal window to show any data. I've been trying to get the about me.html content to show when the 'about me' button is pressed. Any help would be very much appreciated! http://jsbin.com/yabewahe/1/edit?html,css,js,output http://jsbin.com/mososobu/1/edit?html,css,js,output
  • getJSON problem

    This code does not work chrome debugger says received an invalid response origin is null therefore not aloud access. This is the same for both local machine and web host. <script> $(document).ready(function(e) { $.getJSON("JS/testobject.js",function(data){ $.each(data,function(key,val){ $('body').append(key + ":" + val +"<br />"); }); }); }); </script> The JS/testobject.js file contains the following var data = [         {             "key": "value",             "key": "value"         },        
  • Server side pagination using Jquery tablesorter pager and ColdFusion is not working

    In my application I am using Jquery table sorter and pager.I need to do server side pagination using this pager's ajaxURL and ajaxProcessing options.I am using server side language as coldfusion. When I call a cfc method using this ajaxUrl option in pager I am getting "Uncaugh error :OK[200]"in the table cell. Here is the code that I am using  ================================= $(document).ready(function() {      $("#myTable")      .tablesorter({widthFixed: true, widgets: ['zebra']})      .tablesorterPager({
  • Mock service call QUnit with QUnit

    I have a javascript file where I am using include.js. The file (ContactsManager) looks something like this:     define([],    function() {             'use strict';             var exports = {};             exports.ContactsManager = function (service, contactsContentHolder) {                                    this.getExistingContacts = function() {                     // display wait image until service call does not returns                     var waitImageDiv = document.createElement('div');    
  • create as animation (cartoon) in jquery

    Hi, Everyone Is there any plugin or something to animate images as a cartoon animation? Creating a cartoon animation by jQuery! thx
  • how to make jquery event in the popup work?

    <!doctype html> <html lang="en"> <head> <meta charset="utf-8"> <script src="http://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script> <script src="http://cdn.leafletjs.com/leaflet-0.7.2/leaflet.js"></script> <link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.7.2/leaflet.css" /> </head> <body> <div id="map" style="width:500px;height:500px;">         <script>         var map = L.map('map').setView([54.6154, 18.8141], 7);                 L.tileLayer('http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',
  • Refresh only a div every 30 sec

    is it possible to refresh a div every 30 seconds without calling in an external page. for example there is a div called #sample and i want #sample to refresh every 30 seconds.
  • Inserting a button in <td> on condition.

    Hi everybody, I'm still here because I need your help to realize something like that: I have an html table, when value of <td> is > 6 I would like to color it red and when I click on it, it runs a js function. But only when the value inside <td> is < 6.   I have  a function that color the value inside <td> in red when it is < 6: $('input[name^="voto"]')      .keyup(function() {           $(this).toggleClass('highlight', parseInt($(this).val(), 10) < 6);      }).keyup(); Thanks in advance. Tegatti
  • Jquery UI Slider different sizes ?

    Can i make different size of sliders with jquery ui ? I need to make a small slider and a bigger one (and with slightly different css) I already made the big slider. Here's what i got for the first slider (i customized the slider appearance): .ui-slider .ui-slider-handle { position: absolute; z-index: 2; top:20px;bottom:0;margin:auto;;width: 24px; height: 35px; cursor: pointer; background : url(images/SliderHandle.png) transparent; border : none;} .ui-slider-horizontal { position: absolute; top:875px;left
  • How save changes of a editable list?

    Hi everyone  i have a code of a listview. You can add and elimitate items of the list. Also if you click on an item list this open a square. In this square you find a input text. here its the code: http://jsfiddle.net/juank_romero/hA8Ps/11/ I need save all the changes that the user makes, i mean save the changes (add/ eliminate items) that the user makes to the default list view. and also save the text that the user write in each text input. The idea is that any user could edit their own listwiew.
  • send data (POST) from jquery to controller in cakephp

    Well, The problem is that I always get the same error "anonymous function" is because when I want to send data via post these never find the Controller or the path to the Controller, I have proven with three ways to send data in the JS. validate.js $(document).ready(function(){ var route ="<?php echo Router::Url(array('controller' => 'soyaproductorcompras','action' => 'validate_form', 0 => $this->request->params['pass'][0], 1 => $this->request->params['pass'][1]));?>"; $('#proveedor_carnet').blur(function(){
  • $.post(URL,data,callback) is the same of $.ajax({})?? If yes, w en should we use one instead of the other one?

    Im starting to study ajax, and I did my first example reading a tutorial. In my first example, Im deleting images from a gallery, without loadingmy page. I have a jQuery function that executes when I click in my image with class "imagesdel", and then I get id of my image to use in my post. $(function(){ var url = 'delImage.php'; $('.images ul').on('click','.imagesdel',function(){  var delId = $(this).attr('id');  $('.images ul li[id="'+ delId +'"]').css('background','green');  $.post(url,{action:'del_images',image:delId},function(){
  • jquerymobile multiple pages in seprate html

    Hello, im new to jquerymobile and trying to set up a website. I would love to use seperate files for some pages. so i set up a index.html with a menu linking to some internal pages and some seprate html files. when i navigate to a page in a separate html file, the first page in this html loads correct, but if this seperate html also consists of sevral pages, links to those internal pages dont work. when i refresh this second html the links to the internal pages do work again? to explain a bit more,
  • JQM with phonegap showing "Uncaught TypeError: Object # has no method 'remove' "

    Hello,  I am using JQM 1.4.2 with phonegap i am getting error as :  1) "Uncaught type error : Object # has no method 'remove()' file:///android_asset/www/scripts/jquery.mobile.min.js: 7 "; on line number 7 of "jquery.mobile.min.js" there is method "this._ui.screen.remove()"  this is happening while redirecting the pages.  I have three different pages : home.html,reg.html,calResult.html.  On these pages i have include "jquery.mobile.min.js" as i need it on all three pages. I am redirecting all these
  • QUnit test runner output via Karma process?

    I currently have two runners for my tests, which means maintaining two, and I'd like to meld them into one process.  I have the standard QUnit html runner page, and I have Karma running tests through PhantomJS. Is it possible, from Karma, to pipe and output test results through the QUnit html runner page? What I'm ultimately after is the reporting and granularity of the QUnit runner page, but having that sourced and output via Karma, rather than having to maintain the QUnit runner page as a separate
  • Problem with elevator zoom plugin

    Hi My Script doesn't work if I use it with the elevator zoom plugin at the same time.  <html> <head> <title>Wir feiern die Wirtschaft der Zukunft</title> <link rel="stylesheet" type="text/css" href="style.css"> <script src="http://code.jquery.com/jquery-1.9.0.js"></script> <script type="text/javascript" src="js\elevatezoom-master\jquery.elevateZoom-3.0.8.min.js"></script> </head> <body> <div class="container"> <img id="zoom_07" src="oebu.png" data-zoom-image="oebu.png" /> <script> $("#zoom_07").elevateZoom({
  • How to get the position of cursor?

    Hi I am trying to include many different hover selectors on just a simple img tag. They would just explain each part of the image in words. Because I cannot work with classes or IDs, I will need to find out the current position of the cursor first.  I tried it this way but the problem is, if I resize my browser the values are no more the same. Is there a way I could fix this problem or is there another way to realize what I want to do?
  • How to access data in callback function?

    My problem is that I want to hit an external api with an asynch callback function in a loop, and I need access to the loop index in that callback function. In this case the external api is the Google Directions Service, but that really isn't the key point; could be any api whose signatures I can't control. Anyway, my jQuery skills are only at the advanced beginner/intermediate level, but I managed to read up on the jQuery Deferred object and create code that serializes the asynch calls to Google's
  • Not showing images in url rewrite in htaccess

    I have to rewrite url (http://localhost/abcd/subcata.php?id=23&title=building) to (http://localhost/abcd/31/buildings) I have done rewrite rule with the following code but other extension files like images, css are not accessing. Images are located in (images) folder, What i do to show the images or attached css files. thanks in advance RewriteEngine On RewriteRule ^(.*)/(.*)\/$ http://localhost/abcd/subcata.php?id=$1&title=$2 [NC,L]
  • When we should use $(document).ready(function(){ in our jquery program?

    Hi <!doctype html> <html lang="en"> <head> <meta charset="utf-8"> <title>jQuery.each demo</title> <style> div { color: blue; } div#five { color: red; } </style> <script src="jquery-1.11.0.min.js"></script> </head> <body> <div id="one"></div> <div id="two"></div> <div id="three"></div> <div id="four"></div> <div id="five"></div> <script> var arr = [ "one", "two", "three", "four", "five" ]; var obj = { one: 1, two: 2, three: 3, four: 4, five: 5 }; jQuery.each( arr, function( i, val ) { $( "#" + val
  • jquery tabs

    Hello, i developed an application to test webservices and return a json code and i put it in new tab of (.ui-nav-tab). when i select the webservice, a new tab will be created with json code in the content-tab. But i have a big problem !! when i add a new tab, the content of the previous tab become empty. Can you help me please. i have a short deadline.
  • Access new appended DOM element

    Hello there, I'm trying to create a form with an undefined number of elements. It's in a table, the "add" capability came from a choice, and I want to insert the new element (my "test" row actually) just before the 'adder' element (created with jQuery). So my actual code is: jQuery(function($){     $("input[name='ptype']").change(function() {         var adder = document.createElement('tr');         adder.setAttribute('id', 'adder_1_1');         adder.innerHTML = '<td class="trow1">Add :</td><td
  • Issue on Updating jQuery setTimeout()

    I am trying to make a simple plugin to calculate date and time by this code: <div id="timer"></div> $.fn.timeCounter = function(time) {          var target = new Date(time); var now = new Date(); var timeDiff = target.getTime() - now.getTime(); if (timeDiff <= 0) {         clearTimeout(timer);     } var seconds = Math.floor(timeDiff / 1000); var minutes = Math.floor(seconds / 60); var hours = Math.floor(minutes / 60); var days = Math.floor(hours / 24); hours %= 24;     minutes %= 60;     seconds
  • checkbox handler not working

    I have a very simple setup but for some reason, the event handler for a checkbox is not firing. first my php outputs a bunch of check box options based on admin input in the back-end. The result outputs checkboxes like so: <div class="span2">       <input type="checkbox" name="Veg" value="BLACK OLIVES">BLACK OLIVE </div>My javascript file is also super simple and I can see it in the inspector being loaded.  $(":checkbox").change(function () { alert( "Handler for .change() called." ); });Not exactly
  • making data available outside the doc.ready function

    I am building an app using backbone....the backbone code is enclosed in the familiar document.ready function. And the file where this code is located is imported(with the usual method in the header of a page) in a PHP script. What I am trying to do is a variable that is inside the document.ready function,I want to make it available in the PHP script....an example will illustrate the case I think. $(document).ready(function() { var john='45' }); <?php   <div id="test">   document.write(john); </script></div>
  • JQUERY plugin for Ajax request , table sorter and pagination

    In one of my application I am using JQUERY table sorter plugin and it's addon pager also to do pagination. To use this initially I am querying database which contains huge data. Once it is queried then I am looping through the query and display in front end. Then I am applying JQUERY table sorter and pager. Now columns are sorting properly and pagination is also working. My problem is as it is a huge query I may get time out error and hence table sorter and pagination will not work. As a work around
  • How "$(selector).each()" function is working in jquery?

    Hi Here is the code : <!DOCTYPE html> <html> <script src="jquery-1.11.0.min.js"> </script> <body> <table id = "myTable" style="width:300px"> <tr>   <td>Jill</td>   <td>Smith</td>          <td>5</td> </tr> <tr>   <td>Eve</td>   <td>Jackson</td>          <td>5</td> </tr> <tr>   <td>John</td>   <td>Doe</td>          <td>11</td> </tr> </table> <script> $(document).ready(function(){ $('td:last-child').each(function(i) { $(this).html((function A(n) {if (n==1)   return 1;   else   return n*A(n-1)})( $(this).html()
  • Triger "function" after scrolling by an element. [Solved]

    Dear JQuery Forum UsersHi, I'm trying to execute an "animation" when the user passes by(scrolling) a specific element( e.g.: "div" ). After trying many online tutorials and solutions about that I still haven't find something that fits for what I'm looking for. Could anybody suggest me something? (If you want me to post some of the code that I've already tried, Please inform me) Thanks a lot, -Pain-
  • JQuery UI autocomplete, Load all Data in DOM instead taking from mysql DB

    Reason: Want to speedup autocoplete result What i have: I am having two Input boxes. One is Category and another one is Variety. First im selecting Category by, $("#category").autocomplete({ autoFocus: true, source: function(request, response) { $.getJSON("./php/autocompletenontex_getcategory.php", { category: request.term }, response); }, minLength: 0, select: function( event, ui ) { $('#variety').focus(); } }).focus(function() { $(this).autocomplete("search", ""); }); The above code shows autocomplete
  • Problem Playing Live Streaming Radio on Mobile Browser

    Hello Everyone, I am just starting to learn Jquery Mobile. I am creating a Mobile application for an Online Radio Streaming application for a FM Station. They have a streaming server and has been using it on their website. I have added the following code in jquery mobile application: <audio id="idRadio" preload="auto" controls="controls" src="http://192.190.84.25:9974/;stream.nsv&provider=required_file.swf&volume=100&autostart=true"> </audio> The problem is, When I browse the page in PC the audio
  • Passing parameters to url

    Hi, I am new to javascript and jquery but found it very useful for what I am trying to do. I found a sample code online, which uses jqGrid with local data: http://jsfiddle.net/hE2GB/. I have added a line "url: 'api/editSelection'" similar to the example code below to editsettings {} on line 114. My question is: How do I pass dynamic parameters to a url i.e. within the function below instead of zipcode = 97201, I'd want to use an array element zipcode = grid[0].p.selrow? $.ajax({ url: "/api/getWeather",
  • please assist with an easier way to call a function

    I have an image which on hover a div appears below the image. The problem is I don't know the easiest way to handle the functionality for multiple images. Right now all of the images have the same class (item) so the hover effect occurs on all the images at the same time, and I only want the effect to occur when hovering over each image individually. The CSS code is: .VFP a:link, .VFP a:visited, .VFP a:active{ color:#fff; opacity:.5; text-decoration:none; } .VFP a:hover{ color:#fff; text-decoration:none;
  • I am unable to add the content value in Jquery Panel

    Index.js ***************************** jQuery('body').layout({                                                                 north: {                                 paneSelector:            ".north"                             ,    size:                    "auto"        // eg: "auto", "30%", .30, 200                             ,    resizerCursor:            "n-resize"    // custom = url(myCursor.cur)                             ,    customHotkey:            "north_key"            // EITHER a
  • JQuery .load() only working in safari

    Hi there, I'm trying to load in an external href into a div on my webpage and then apply CSS to it. I am using JQuery .load() to load in the html and it works great in safari and my CSS applys to it. But when I open it using Chrome, Firefox or IE it doesn't load the html into the div. I was wondering if there are any other solutions for doing this?  I've read in places you've got to change your settings using terminal but that is not an ideal solution to an average user. Hopefully someone can help
  • 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