• how to divide a page into parts?

    As I can split a jquery mobile page to make a menu like this:
  • HTML content returned from jQuery.ajax not parsing as HTML

    I'm using a coldfusion cfsavecontent tag in a cfc to generate a block of html.  This cfc is called from jQuery.ajax.  The success block is this function: ,success: function(response) {     jQuery("#divDataDisplay").html(response);     [other unrelated code here] } The content that displays on the page due to the success block includes html tags as plain text - not rendered as html. The closest closed ticket I found was http://forum.jquery.com/topic/display-the-result-of-jquery-ajax-call-as-html-string-and-not-plain-string
  • JQuery Mobile: Scroll effect transition to same page anchors

    Slight novice here, so please bear with me! I am using this technique to link to anchors within the same JQuery Mobile page: http://dev4theweb.blogspot.ie/2012/07/anchor-links-and-jquery-mobile.html and it works. What I cannot get working are any of the solutions out there for smooth scrolling to these anchor tags. Has anybody figured this out? Thanks.
  • Object doesn't support property or method 'jstree'

    Hi, I'm new to jquery and I'm been trying to learn by jumping head first into a few simple projects that I need for work.  I'm working on a simple MVC project where I would like to present a file system and some files to the end user.  It's pretty simple concept. So using NuGet I downloaded and installed jquery 1.9.1 and jstree 3.0.  I created a simple page and controller and added the reference to both jquery and jstree, created a simple ready method on a div object, and when it hits that line it
  • Hover Function Not Working On Rapael.js Objects From an Array

    Using Raphael.js 2.1.0 I am trying to create circle objects on the Canvas from an array of coordinates by using this code: var map = Raphael('canvas', 500, 500); var coords = [ [150,50], [20,85], [350,95] ]; var circle; for(var i = 0; i < coords.length; i++){   circle = map.circle(coords[i][0], coords[i][1], 20);   circle.toFront();   circle.attr({       fill: '#98ED00',       translation: "4,4",       stroke: '#FFF',       'stroke-width': 4,       opacity: 1,   }); }   circle.hover(   function ()
  • Combine results from two separate REST Calls

    Hi all, I am using $.ajax to output REST data that is similar in structure across two data sources. I will be placing the data in a table. I was thinking of just appending the data from the 1st then the 2nd source. Is there any value to merge these, and if so, how would I do it? Thanks! Kelly
  • Help with animating a child element

    Hi all I have the following HTML of links: <ul class="maingrid">     <li><aside class="slidebox left">Test One</aside><img src="/images/image.jpg"></li>     <li><aside class="slidebox right">Test Two</aside><img src="/images/image.jpg"></li>     <li><aside class="slidebox top">Test Three</aside><img src="/images/image.jpg"></li>     <li><aside class="slidebox bottom">Test Four</aside><img src="/images/image.jpg"></li>     <li><aside class="slidebox right">Test Five</aside><img src="/images/image.jpg"></li>
  • Deferred execution order

    When creating a new Deferred object, if I attach handlers in the following order: var x = $.Deferred(); x.done(function () { console.log('done 1'); }); x.always(function () { console.log('always 1'); }); x.done(function () { console.log('done 2'); }); x.always(function () { console.log('always 2'); }); x.resolve(); I get the following output: done 1 always 1 done 2 always 2 Is this a bug? Why don't all of the 'done' functions fire before the 'always' functions?  Why are they intermingled? Thanks!
  • How to use JQuery Custom validation method to validate phone number

    I wanted to validate a phone number using jQuery custom validation method.I tried to write a method for that but it didn't work .Can anyone help me to find the error of this code .As I'm new to this language I don't know much about jQuery. here is my code $(document).ready(function () { jQuery.validator.addMethod('phonenu', function(value, element) {     if(element.value != 10 && element.value == isNaN)     {         return false;     }     else      {    return true;              }, 'Invalid phone
  • select and desappear

    Hello every body i am the newbie in java script  I want to do this homework: cinema's reservation   I have a page like this:  page_1.html [CODE] <!DOCTYPE html> <html> <body> <h2>how many tickets do you want? </h2> <form action = "page_2.html"> <select>   <option value="1">1</option>   <option value="2">2</option>   <option value="3">3</option>   <option value="4">4</option>    <option value="5">5</option> <input type="submit"> </form> </select>    </body> </html> [/CODE] page_2.html [CODE] <!DOCTYPE
  • center a ul in a div

    Hi, It is  a silly question but I am not able to solve this issue. I have a ul list in a div , in the <li> I am putting images with a float left. (see attach). The issue is I cannot center the list in the middle of the div, i have always the gap on the right. I think it is beacause of the float:left but how can i do? <div data-role="content" style="padding:0px;margin-left:0%"> <ul id="Gallery" style="margin:0;padding:0;height:50%;"> <!--class="gallery" --> <li style="list-style: none;padding: 0;
  • Share - Public panel for multiple pages

    Hi friends, I'm almost new to jquery mobile,and i got a little issues with my pages and their panel: I have a right panel inside a page looks like <div data-role="page" id="home" class="ui-responsive-panel">       <div data-role="panel" data-position="right" data-position-fixed="false" data-display="reveal" id="my-right-panel" data-theme="b"></div> </div>and the panel show up when swipeleft event fires. Later I add another panel <div data-role="page" id="pageAbout"></div>Because the right panel is
  • navbar - three columns per row for more than 5 navbar items

    This is just a suggestion, and is more of an aesthetic one than functional, i just feel that when there are more than 5 nav items in a navbar, the buttons should wrap into three columns per row instead of the current two. I think it looks better and uses less vertical space. will be happy to provide an update if this is agreed upon.  
  • Using JQM Flip Toggle Switch for submitting two different status informations

    I like to use a jQuery mobile flip toggle switch to submit two status informations to control the two status of a relais. Instead of using: <input class="scene_btn" type="submit" onClick="request('key=1')" value="on" data-theme="d"</input> <input class="scene_btn" type="submit" onClick="request('key=2')" value="off" data-theme="d"</input> I'd like to use a JQM flip toggle switch, to switch on and off a relais. <form> <label for="flip-1">Flip toggle switch:</label> <select name="flip-1" id="flip-1"
  • Related Info + Cascading Dropdowns

    Hi we started having problems with the jQuery since this morning. The SharePoint 2010' forms that had being using JS and JQuery stopped working…  Any thoughts?  Thanks
  • Simulate Hover on Mobile Device

    Hi folks, I am using jQuery for my drop down menus on a website. When the mouse hovers over an ul the li items appear and drop down. Everything works fine. However when I view the site on a mobile device then a problem arises. there is no hover event. Below is the jQuery code I am using: <script type="text/javascript"> $(document).ready(function(){ $("#nav-one li").hover( function(){ $("ul", this).fadeIn(800); }, function() { } ); if (document.all) { $("#nav-one li").hoverClass ("sfHover");
  • Syntax error in code with 1.11.1 update, worked with 1.10.2

    So as of version1.11.1 this string of code no longer works and throws an error.  This is the error - Error: Syntax error, unrecognized expression: #rsmn_vehicle_make option[value=].  How could I change this to work with the latest version? $("#rsmn_vehicle_model option[value='<?php if(isset($qinfo['model'])){echo stripslashes($qinfo['model']);} ?>']").attr('selected','selected');
  • Creating Pager for dynamic html table

    Hi, I have a div element to which i am adding a html table with rows. There is no table header and footer.   Jsfiddle: http://jsfiddle.net/KCJ4s/   I would like to add pager to the html table with the options of "First","Next", Numbers, "Last", "Previous". How to create a pager for the dynamically created table.   I have tried with datatables.net pager, but the paging is not shown. Jsfiddle for datatables.net pager: http://jsfiddle.net/Nh9AQ/   How to create paging for dynamic created table? Thanks
  • Changing the format of the datepicker.

    Hi I'm really a nube to this, so please bear with me. I am using this datepicker that I got on this site. I would like to change the format of the date to mm-yyyy I also would like to know how can I get the date and use it in a href on my site. Ex: replace the 05-2014 with the date from the datepicker? Thanks. <li><a href="http://apmtl067/storage/reportData/ddgraphs/ORA_space_05-2014.svg" target="content" class="underline">Oracle</a></li> <!doctype html> <html lang="en"> <head> <meta charset="utf-8">
  • Strange behavior with $.unique()

    The doc on $.unique() states thus: Description: Sorts an array of DOM elements, in place, with the duplicates removed. Note that this only works on arrays of DOM elements, not strings or numbers. ..... This function only works on plain JavaScript arrays of DOM elements, and is chiefly used internally by jQuery. You probably will never need to use it. I don't use this function; I have never needed to use it. However, I happened to be playing around with it and discovered something very strange. The
  • $.post not working on shared server but working locally

    I have a script that sends some HTML to the server and server saves the HTML as a newsletter. the script works perfectly on my localhost, but, when i put it online, it doesnt. I checked the file permissions, the URL, the php file but nothing solved my problem I have been looking for a solutiin for this problem since last week:     $.post("newslettersAPI.php",             {id:newsletterID,templateID:templateID,content:content,subject:subject},                 function(data){                                        
  • Using JQM Flip Toggle Switch for submitting two different status informations

    I like to use a jQuery mobile flip toggle switch to submit two status informations to control the two status of a relais. Instead of using: <input class="scene_btn" type="submit" onClick="request('key=1')" value="on" data-theme="d"</input> <input class="scene_btn" type="submit" onClick="request('key=2')" value="off" data-theme="d"</input> I'd like to use a JQM flip toggle switch, to switch on and off a relais. <form> <label for="flip-1">Flip toggle switch:</label> <select name="flip-1" id="flip-1"
  • Tablesorter

    After upgrade from tablesorter 2.10.8 to latest 2.16.4, I get extra margin in the top of first row content. Anyone knows how to fix it? FYI, it is fine in other tables if filter is not applied. My second problem, as you can seen the screen cap below, even I set the width for the table, but the table size is still over-sized. I think this may be caused by the column data which is a long string, e.g. email address, that cannot be shown in multi-line. Any solution? Thanks for reading and your help is
  • How do I choose the initial date without selecting a date with the datepicker?

    I am allowing only certain dates to be selected by the datepicker calendar. When the page first loads, I want the calendar to be showing my first available date. I tried initializing the datepicker with the defaultDate set to my date. This shows the date like I want, but it also selects it. How can I show the date on the calendar without selecting or highlighting it?
  • Clickes Counter issue with fadeout.

    Hello,   I have been strugling with this for the last 6 hours. Any help.  there is some thing wrong with it but I don't know what is it, it works but not every time. Here is the code sample : <!DOCTYPE html> <html> <head> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"> </script> <script> $(document).ready(function(){   var clicked = false;   var missedclicked = 0;  setInterval(function(){     clicked = false;     $("p").fadeIn(3000, function() {        // Animation
  • Sortable Widget - “Sortable” but not drag-able items.

    Done some digging and have reached the point where I need fresh eyes on this. I have 2 connected sortable divs( #sortable1, #sortable2). Any number of items populated in #sortable2 on page load need to be accessible to / included in the “toArray” method, but they, the items populated on-load, can not be moved/draggable. In essence, preventing them from being dragged to #sortable1. The items populated in #sortable1, need to behave “normally” when dragged to #sortable2 and / or back. So far the closest
  • Issue on Jquery Background Image Fade In and Out

    I am trying to change a background image of a html5 canvas from dropdown select by using following code $('select').on('change', function() { if (this.value ==1){  $('#canvas').css('background-image').fadeOut();  $('#canvas').css({'background':'url(http://localhost/MapBox/img/cal_NAs.png) no-repeat top right,url(http://localhost/MapBox/img/bg_sh.png) no-repeat top right','background-color' : 'grey'}).fadeIn(); } }) but this is not doing the job and I am getting this error on console : Uncaught TypeError:
  • Problem with datepicker and overlay() jquery tools

    I'm loading a datepicket on a input, the first time, it's correctly running without problem but when I close the windows ( Overlay ), Then I try to open the windows but the datepicket doesn't work. I need refresh the webpage  and Then again a can use the datepicket only one time. 
  • jQuery secure connection

    I have been searching around but haven't quite found my answer.  If I use jQuery on my mobile app and connect to an api/page to verify a login, is this secure, can anyone intercept the data? I have been reading things on encrypting the data that is being passed to my server and creating token keys being passed back and forth but if someone can see the data transfer it would be easy to post data to my PHP script right?  Any help would be much appreciated.  example below: $.ajax({       type: "POST",
  • How can I check the url outside of frame?

    Hi guys, I'm trying to manipulate my content with jquery based on the URL. The script works as it should on desktop. But I'm having a problem with mobile app or mobile site, it doesn't capture the correct URL because the content is in iFrame. The problem is that the iFrame doesn't contain the content I'm after... Any one can advice the way I could make it work? Here is what I'm talking about: Example This is the script I'm executing: jQuery(document).ready(function(){     if (document.URL.indexOf("ebay.co.uk")
  • switching mp3 on secondary hover?

    happy mondays all - wondering if there are any jquery heads on here that can help me out with something. i have some script in a page that triggers an audio clip when an area/image/text is moused over/clicked etc.... does anyone know how i can swap between two audio clips on a second, third rollover - or rather swap between the two triggerings. so on initial mouse over it plays 1.mp3 then when it is moused over again it plays 2.mp3... here is the script that is above the head... <script type='text/javascript'>//<![CDATA[
  • how initialize global variable inside a function

    var t =' '; function k() { t="hello"; alert(t); // alerts hello } alert(t)// needs to alert hello
  • scroll to anchor only on data-anchor links

     html <a name="anchor-0"></a> <a data-anchor="anchor-0" class="flex-item-1" href="#target-1">1</a> <a data-anchor="anchor-0" class="flex-item-1" href="#target-2">2</a> jquery $(document).ready(function() {     function scrollToAnchor(e){         var aTag = $("a[name='anchor-0']");         $('html,body').animate({scrollTop: aTag.offset().top},'400');         e.preventDefault();     }     $("a").data('anchor','anchor-0').click(function() {         scrollToAnchor();         return false;      });  
  • initializing a global variable on refresh.

    how to initialize a global variable after clicking the refresh button. var globvar; function refresh() { location.reload(); }
  • disable the IOS popup send message /add to contact /copy

    How we disable the IOS popup send message /add to contact /copy when the user select a number.
  • Add bullet to existing class

    Here's what I have: <td class="ms-vb2"><a href="whatever">Text here</a>   What I need to do is add a bullet around the anchor tag so it looks like this <td class="ms-vb2">        <li>             <a href="whatever">Text here</a></li>   Is there any way to do this using JQuery? Uncle D
  • Adding and updating multiple tables from within one form?

    Hi, I am new here and more or less new to jquery & Ajax but I'm fairly adept with MySQL and more. Before I begin I'm trying to find a good direction to follow as I will be learning on the fly. I basically want to be able to enter a bunch of info about an item(building) and submit it from one page. This building will contain some basic info where there is only one value for each item, so one table will be fine for this part, but it will also contain info for items that have multiple values - this
  • Output is not coming while using addClass method

    Hi Here is the jquery code : <html> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script> <body> <script> $(document).ready(function(){ $( "<div></div>" ).after( "<p>Exception</p>" ).addClass( "foo" ); console.log($("p.foo").get(0).innerHTML); }); </script> <div> Hello</div> <p id = "world"> World</p> </body> </html> Behaviour should be like this : <div class = "foo">Hello</div> <p class = "foo">Exception</p>-------------------------------------------------->line
  • Launch a native navigation application

    Hi everybody, I googled about that but didn't find exactly what I would like.  Actually, I want to create a link, containing coordinates of a place, which opens your native navigation app and make the route from where you are to the place. So I can use a Cordova plugin to geolocate the user but I don't know how to launch the app and make the route. Thank you !
  • Dialog modal

    Hi, I have the following code - $('#dlg').dialog({                                 open: function () {                                 },                                 width: 800,                                 height: 500,                                 title: 'Test', //json[0]                                 modal: false                             }); When modal attribute set to True the dialog shows and there is an horizontal strip crossing the browser window behind it, like a div tag with
  • 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