• Callback to run before all tests in a module

    I have a need to run a setup/teardown callback to setup state once for all the tests within a module. I have something implemented that works like: module("My Module", {   beforeAll: function(){     // will run once for each module in which it's defined before all tests   },   afterAll: function(){     // will run once for each module in which it's defined after all tests have run   } }); Would this be something we'd be interested in having in QUnit?
  • QUnit Module Setup and Teardown

    For the QUnit callback functions for setup and teardown: Does setup get called before each test function? Does teardown get called after each test?  From what I can see in my own tests it seems like setup gets called ONCE per module and teardown gets called once PER TEST. Just wondering if this assumption is correct or not. Thanks!
  • SlideToggle on multiple divs to maintain state during postbacks

    I have jscript to toggle divs to slide up and down. I would like to maintain the state of these divs  (open or closed) during postbacks. I read on other posts I can use cookies and hidden fields, but I don't know how to use it when using multiple divs with my jscript. How can I maintain the state of the divs so that it stays open/collapsed during postbacks.  How will I pass parameters to the jscript? Jscript: <script type="text/javascript"> $(document).ready(function () { $(".toggle").slideUp(0);
  • Relocating jstree’s themes

    Hi, I am using jstree (jstree.com) and it comes with default themes located directly under where the jstree script is located.   For me this is in the Scripts folder. So I have /Scripts/themes/classic. I wish to move this folder to /Content/themes/jstree/classic I read up on the jstree docs, which states to simply add the “url” attribute under the themes section in the config file. The docs state:   url: A string (or false if not used). Default is false. The location of the theme's CSS file, if set
  • Getting multiple images to fade in and out randomly.

    Hi, I have a concept I want to develop but haven't been able to find a jQuery plugin that will do what i need. I am hoping if someone knows of a script or even to share if this is possible. What I want is to have about 10 small images to be displayed horizontally and have each of these images fade in and out at random times and being replaced by other images. I have a flash example that i would like to replicate that would give you an example of what i want to achieve. If you look at the bottom of
  • Jquery PDF Viewer Plugin with protection

    Hi, Im Looking plugin for pdf viewer for my site, the issue here, most of the plugin like https://docs.google.com/gview are still allow the user to select the text. What I want is something like amazone book viewer, where user cant select the inside or download the pdf. Anyone knows? Thanks
  • clone to copy form field values

    This code snippet, when added to the clone() method copies form field values. Tested with IE 7 and FF 2 on Windows.         // Copy .value and .checked attributes of form fields         var dstFormElements = ret.find("*").andSelf().filter(":input");         if (dstFormElements.length > 0)         {             var srcFormElements = this.find("*").andSelf().filter(":input");             dstFormElements.each(function(i)             {                 $ektron(this).val( srcFormElements.eq(i).val() );
  • $(this + "option:selected").attr("rel") option selected is not working in IE

    The code below works perfect in Firefox, not in IE8 :( any fix is appreciated!             <script language="javascript" type="text/javascript">                 $(document).ready(function(){                       //var imgpath = 'images/sandles/';                       $("select.swatchesList").bind('change', function(event){                             var img = $(this + "option:selected").attr("rel");                             $('#HeroImage').attr('src' , img);                       });        
  • Resizable: options stop event vs resizestop event?

    So I'm trying to do the following: Create new div Make div draggable and resizable Add new div to container Trigger resizable "stop" event to set some values that would be normally set when resizing I'm using something like this code: var resizableOptions = {       handles: "n,e,s,w,se,sw,ne,nw",       containment: 'parent',       stop: function(ev, ui) {             console.log('resizing stopped');             ui.element.data('mywidth', ui.size.width);       } }; var $newDiv = $('<div id="mydiv"></div>');
  • AJAX Insertion - need default jquery-mobile styles

    I have a type of hierarchical select for regions. The first select box gets displayed. Let's call it "continents" and define it as: <select name="continents" id="continents">   <option value="1">Africa</option>   <option value="2">North America</option>   ... </select> The second select box (which is dependent on which continent you select) contains a list of countries and is generated by a PHP page server-side and accessed via an Ajax call. The functionality I have implemented works fine. The select
  • On the architecture of qunit-fixture

    [Please ignore this idea and focus on the reply. It explains why we were seeing setup and teardown called out of order and why we were under the impression that qunit-fixture was designed poorly. Cheers!] (Preface: I'm a relative new-comer to QUnit. I apologize if the following aspects of qunit-fixture have been discussed ad nauseam. I searched on google, stackoverflow--and of course here--and found nothing similar.) qunit-fixture is obviously a key aspect of QUnit and it does its job of preventing pollution just
  • White frames between div auto-refresh (only Chrome e IE)

    After reading several interesting posts on this site, the auto refresh of a div containing an image, it works correctly. Why between a refresh and another I get an empty div? (in chrome e IE, for a short moment). In firefox next image is loaded instead of the current without empty div. The next image is already present in the cache since I do a preloading of the next image Thanks My code: <head> <script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"> </script> <script type="text/javascript">
  • Animated collapsible set

    I'm trying to figure how to animate the standard collapsible set. I know how it works with standard jQuery but I want to make use of the one provided by the jquerymobile framework. Any suggestions ?
  • Wrap every 3 divs in a new div

    How can I wrap every 3 divs in a new div? So If I have; div1 div2 div3 div4 div5 div6 I need this to become; <div> div1 div2 div3 </div> <div> div4 div5 div6 </div> I also need this to wrap the last div(s), even if their are less than 3 so this; div1 div2 div3 div4 div5 div6 div7 Would become; <div> div1 div2 div3 </div> <div> div4 div5 div6 </div> <div> div7 </div>
  • Form submit button in JQuery Mobile popup does not do post back on first click

    Hi, The popup sign in form does not submit correctly. PROBLEM: See subject title. REPRO STEPS: 1. Load a page with a form popup such as the sign in code, taken from http://jquerymobile.com/demos/1.3.0/docs/widgets/popup/: 2. Click the button to open the popup. 3. Click the Sign In button on the popup. 4. Notice that a post back did NOT happen. 5. Repeat steps 1 - 3. Notice now that the post back DID happen. WORKAROUND: The workaround I discovered is that the popup submit button will work the first
  • [jQuery] How dynamically create iframe and add/remove data from it

    Hi folks, hoping for some knowledgeable assistance with this problem. What I'm doing is dynamically creating an iframe in the DOM, then trying to write some data into it. That's the part I'm stuck at. I *am* able to create the iframe, no problem. I have a div with the id #container built into the page in which the iframe is added: $ (document.createElement('iframe')).attr('id','commentiframe').appendTo('#container'); At this point, I don't know how to write data into the iframe that has been created.
  • Putting PHP and JQUERY/ajax together in a web project

    This is a question for PHP programmers who have added JQuery to their projects, I think a lot out of there. I read quite a few books on both PHP and JQUERY but still have my own doubts on how to properly "assemble" a web project using PHP + JQUERY. I am quite a noob specially on JScript and this means a whole new world to me, and I love the separation of style and behaviour proposed by the non obtrusive model. So I have basically PHP pages (could be html but PHP gives me more possibilities like "picking
  • jQuery "selector" property deprecated?

    Hello all, I understand that this property has been deprecated in 1.7. and still is? It's still widely used, very powerful and generic. I'm contemplating, whether to use it in my plugin... (at the moment, I don't depend on it) Obviously, if jQuery is serious about dropping it soon, there's no point in that, right? Or is there going to be a substitute / recommended workaround? Thanks in advance and kind regards
  • Listview with external domain

    I am developing a webapp mobile application. I am using jQuery mobile 1.9 + phonegap 2.4. When I generate a page of HTML with listview, and the page is local,  I can click in a listview item and I see back button, because I have defined data-add-back-btn="true" on all pages But when I use the same page in an external link (domain not local) , when I click in item listview, I cannot see the back button and I can not go back. Is this a bug in jQuery? How I can resolve this?
  • document.ready throwing Object Expected error

    I have an ASP.Net Webform.  On the webform  I included a js file which contained a document ready function call.  The file is located in the cpvfsScripts folder of my project directly under the root.  The jquery min library jquery-1.9.1.min.js is located there as well.   I wrote this application in October.  It was working fine then.  I made a couple of changes to allow me to use a library that used the "$" according to the guidance given at  http://docs.jquery.com/Using_jQuery_with_Other_Libraries .
  • Click inside iframe open event in parent (same domains)

    I have 2 files index.html and index2.html Index.html code: <!DOCTYPE html> <html> <head>   <script src="http://code.jquery.com/jquery-1.4.4.js"></script> </head> <body> <iframe id="frame" src="index2.html">Your browser does not support iframes.</iframe> <div id="details" style="display:none;">Sliding details</div> <script type="text/javascript"> function showevent(){ $('#details').slideToggle('slow', function() {     // Animation complete.   }); } </script> </body> </html> index2.html <!DOCTYPE html>
  • jQuery 2.0.0 compatibility

    jQuery 2.0.0 is released and it looks like it is not compatible with jQuery mobile... I get error `Uncaught TypeError: Cannot read property 'options' of undefined` line 10313 of jqm 1.3.1.  The error seems to be about getting the theme for the panel. I have a panel like this in the html: <div data-theme="a" data-role="panel" id="panel" data-animate="false"></div> Hope jqm becomes compatible soon.
  • Panel on Samsung note only opens once

    Hi I'm using 1.3. Found an issue with the panel only opening once on the Samsumg Note.... it can be opened and closed but will not reopen then. Works fine on any other device I tried so far including older Android versions. JS function call also fails. Any ideas?? Ta Ian.
  • Resize grabber no longer showing on dialogs after 1.10.3 update

    Updated to jQuery UI 1.10.3 (custom theme) and find that my resizable dialogs no longer show the resize grabber in the lower right (SE) corner. The offending code may be the following css in jQuery-ui-1.10.3.css .ui-dialog .ui-resizable-se {     width: 12px;     height: 12px;     right: -5px;     bottom: -5px;     background-position: 16px 16px; } if the right, bottom, and background-position rules are removed I see a grabber again. While I am not sure that the API documentation site ever showed
  • Menu Widget Not Working Correctly in Aspx page

    All, If I take the source from jQuery Menu UI Widget (http://jqueryui.com/menu/) and just get a simple ASPX page to display the menu, the menu will not display corrected. Specifically the sub menus will fly out to the Left even though the menu itself is in the upper left of the page (IE Window).  In effect the sub menu is unfolding outside of the IE Window. Has anyone see anything like this?  Below is what I am using as a simple Aspx page.  If I take the guts of this and paste into a plain HTML page
  • Swipeleft events being fired on swiping diagonally

    Hi In my application  if the user swipes diagonally or scrolls the content the swipeleft or right events are fired? what is the possible solution for this on both iPhone and android. Using the following files jquery.mobile-1.2.0.min.css jquery-1.8.2.min.js jquery.mobile-1.2.0.min.js Please help Thanks Shruti
  • Flip Book

    I am trying to create flipbook for mobile using jquery. I have created that but facing following issue: 1.  I want that it should be auto-adjustable  to mobile screen size. 2.  It should have zoom feature. thanx in advance.
  • Sortable Multiselect

    Hi! I've created a multiselect widget for jQuery. It's based on jQuery UI 1.7 and there's also Themeroller support. Maybe you want have a look at it... Demo at: http://www.quasipartikel.at/multiselect Code at: http://github.com/michael/multiselect Any suggestions/feedback/input welcome. :) Cheers, Michael
  • JQUERY MOBILE CONTACT FORM PHP error

    Hi!  I have a page  in jquery mobile and I can not call the contact.js file  on click the "send" button This is the HTML5 code: FILE: index.html <!DOCTYPE html>  <html>  <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1">  ....... <link rel="stylesheet" href="http://code.jquery.com/mobile/1.3.1/jquery.mobile-1.3.1.min.css" /> <script src="http://code.jquery.com/jquery-1.9.1.min.js"></script> <script src="http://code.jquery.com/mobile/1.3.1/jquery.mobile-1.3.1.min.js"></script>
  • Make Jquery Cycle start on a random slide, but still run in sequence

    Hi, I've used Jquery Cycle to build the following page: http://satherley.com/together.html As you can see the slides run nicely in sequence with a clickable navigation. I would like to be able to run this slide show from a random starting slide on each page load, but for the slide show to remain in sequence and not load random slides thereafter. I'm sure this is doable - but the only random syntax I've found for this plugiin loads just random slides, out of the running order, which makes the navigation
  • 1.3.1 vs. 1.2 and attr("value")

    Hi,   I have a very little project that works very well under jqm 1.2 but same project has lost of issues under jqm 1.3.1. The project only uses jqm (no other third-party resources).   One thing is this:           $('#doAcceso').on('click', function(e) {           showQry({acceUser: $('#acce-user').attr('value'),                    accePass: $('#acce-pass').attr('value')});        }; This function is excecuted when user click a button, and is supposed it has to read values from two input controls.
  • jqGrid in Form Editing + jQuery UI Spinner results in data not being posted

    Hello everyone.  This one may be a bug of jqGrid, but I should check wit the community first. To expand on this thread's title, I have a jqGrid, filled via Ajax.  One of the columns is currency data (dollar amounts) and I would like this value to be edited via the jQuery UI spinner control.  The jqGrid control is set to Form Editing, so as per its documentation I use dataInit of editoptions to run a function that applies the spinner to the standard textbox.  Something like this: //This is one entry
  • Is it possible to display table content in Accordion Headers?

    Hello, I want to use the Jquery Accordion to display the content of a table and I want to dislpay the totals of each subtable in the Accordion Headers. The idea is to use the Accordion to present a drill down table report. Is is possible? If not can you consider to implement this feature in the future? Best Regards, Paulo.
  • changePage in iOS 7 appears to be broken

    Greetings.   Just thought I would raise some awareness on a problem I encountered.  the mobile.changePage function appears to not work with iOS7 beta.  Originally I found this because I develop an app with phonegap, however, I debugged the issue, and I can reproduce it in safari as well.  If I call the changePage function, nothing happens, and it doesn't throw an error in the web inspector either; however, the page at that point stops responding to any navigation request.    My hope is this is an
  • getJSON returning empty array [] from properly formatted nested JSON object

    Hi jQuery forum, I've been wracking my head on a weird bug for an embarrassingly long amount of time. Google's been of no help so I hope somebody can lend a hand. I have a PHP script that returns a properly formatted JSON object (I've validated it using JSONLint) that looks like the following: { "ID":"23",   "LastName":"Moe",   "FirstName":"Ronnie",   "Orders":[{"OrderNumber":"1","ItemNumber":"1"},                  {"OrderNumber":"1","ItemNumber":"2"}]} Pretty simple. But when I use getJSON to grab
  • Problems changing page on wp8

    Hi, I am creating an app on phonegap with jQueryMobile, I allready deployed the app successfully on android and iOS, today I created took it to windows phone 8 and I am not able to change pages after the second first transition anymore. I also tried it on windows phone 7, there it worked fine. For changing pages I am using  $.mobile.changePage("#page_main"); I am using the newest versions of jquery, jquery-1.9.1.min.js and jquery.mobile-1.3.1.min.js, also my phonegap ist running under 2.7.0. Has
  • [jQuery] namespace

    How do I create a namespace within jQuery ? (function($) { var myNS = {}; })(jQuery); (function($) { $.fn.myNS.foo_1 = function(){ }; })(jQuery); (function($) { $.fn.myNS.foo_2 = function(){ }; })(jQuery); $("#id1, id2").myNS.foo_1(); $(".cls1, .cls2").myNS.foo_2();
  • Where can i download this file jquery.ui.menubar.js?

    Where can i download this file jquery.ui.menubar.js?
  • Help with responsive-slider - random order

    Hey, Recently downloaded the following slider which uses jquery: http://w3widgets.com/responsive-slider/ Really like the slider and want to use it on site however would like to make it have a random order function. I have tried to contact the developer with no response and would greatly appreciate any help with achieving this functionality.  Thank you in advance Sam
  • wait until all images are loaded

    Hi, i need some help here, I need my code to execute something AFTER all images are loaded, but I dont know how :(
  • 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