• Having issue with position of jQuery Dialog Box “Center "

    Hi Team , I have an issue with  position jQuery Dialog Box “Cente" , first time I am getting at center but from 2 onwards the position of dailog box is not consistent. PLease suggest me the code  so that dailog box is in center. please suggest me I have written the code as  $( "#basicModal" ).dialog({          title: "Are you sure?",          minWidth: 400,          height: "auto",          dialogClass: "no-close,dlgfixed",          resizable: false,          position: { my: 'top', at: 'top+150'
  • Why Doesn't My Dialog Close On The Button Click?

    Hi guys, I have jQuery code that's executed on a button click which brings up modals based on the validity of the user input. I have buttons on the modals that when clicked should close the modals, I have 4 different if statements and the modals close when the button is clicked on all the modals except the one in the last if block and I have no idea as the code is the same, what is wrong here? Here's my code below $(function(){ $("input[name=addAnotherExpense]").on("click", function(e){ e.preventDefault();
  • Issue passing parameters in $.getJSON

    I have parameters like: status[$in][] fields[] How do I specify in the $.getJSON parameter like that with the brackets and $ sign?
  • Newbie needs help: Load file into jqplot Meter Gauge Chart /AJAX&JSON

    I'm facing a problem loading a simple external file with just one value into my jqplot meter gauge. Here is my working fiddle with hardcoded data: https://jsfiddle.net/enqjh8m3/1/ I read through the jqplot documentation and looked at some examples but I just can't make it work. It's the first time I use jqplot and I'm not very experienced working with js. But havent we all started somewhere? Here is my approach to load a file called keyscore.txt, which just contains [66] My not working code: <script
  • jQuery and IE11

    I am (re) starting with jQuery after a long absence. Am I doing something wrong or is normal that the following code does not display the corresponding icons in IE11? <!doctype html> <html lang="en"> <head>   <meta charset="utf-8">   <title>jQuery UI Button - Icons</title>   <link rel="stylesheet" href="http:///code.jquery.com/ui/1.11.4/themes/smoothness/jquery-ui.css">   <script src="http://code.jquery.com/jquery-1.10.2.js"></script>   <script src="http://code.jquery.com/ui/1.11.4/jquery-ui.js"></script>
  • Show dropdown on Button Click

    I am trying to show a dropdown list on Button click. Example is here http://jsfiddle.net/mdesdev/2V9Ak/ but with my requirement I want the Button "Testing" to hide and the dropdown show in it place so users can select from it. Any help will be appreciated.
  • After pressing the button will display the confirm page again and again,how to fix it?

    <!DOCTYPE html> <html> <head>     <title>jQM</title> <meta charset="utf-8" /> <meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=no"> <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">     <link rel="stylesheet" href="http://code.jquery.com/mobile/1.4.5/jquery.mobile-1.4.5.min.css" />     <script src="http://code.jquery.com/jquery-1.11.1.min.js"></script>     <script src="http://code.jquery.com/mobile/1.4.5/jquery.mobile-1.4.5.min.js"></script>
  • embed jquery in html page

    Hello there, i need your help! I´m trying to start a html/jquery page but it just doesnt work. Attached you find the folder structure and the code of the page. I just dont know what is wrong. this is the code and according to the book i have her ("Apps mit HTML5 und CSS3") I should see a navigation bar in the footer with star-icons... Plus it underlines every "data-role"-tag i write which I don´t think is right either. <!DOCTYPE html> <html> <head>     <title>Testseite</title>     <meta http-equiv="content-type"
  • Using URLs as ids

    In our markup, we often use full URLs as ids. example: <li   role = "treeitem"   aria-selected = "false"   aria-level = "2"   aria-labelledby = "http://anode.com/someidhere_anchor"   aria-expanded = "false"   id = "http://anode.com/someidhere"   class = "jstree-node  jstree-closed" ><i   class = "jicon ocl" role = "presentation" ></i><a   class = "janchor"   href = "#"   tabindex = "-1"   id = "http://anode.com/someidhere_anchor" ><i class = "jicon jthemeicon"   role = "presentation" > </i> funnode
  • jQuery structure vs. theme CSS, what's the purpose?

    in jQuery 1.11 upgrade guide, it says: The jquery-ui.structure.css file provides the structural CSS rules (such as margins and positioning), and the jquery-ui.theme.css file contains the theming rules (such as backgrounds, colors, and fonts). This setup allows you to easily change themes by swapping in new jquery-ui.theme.css files. You can also build a theme from scratch by building on top of jquery-ui.structure.css. The jquery-ui.css file contains both jquery-ui.structure.css and jquery-ui.theme.css.
  • Timer Stops after I drop the first item

    Im trying to do a drag and drop game..but when the user drops the first item correctly, the timer stops even though the other items aren't finished yet.  here is the code $(window).load(function(){     var timer;     var done = true;     var winner = 0;     $("#startClock").click( function(){         var counter = 60;         $("#1, #2, #3, #4, #5, #6, #7, #8, #9, #10").draggable({         revert: "invalid", containment: "#wrapper",         start: function(event, ui){             if(!done) return
  • What is the purpose of using VM's and co ??

    I just recently was working on a site what had its fonts set like so:  h1 { font-size: 4vw; } h2 { font-size: 3vw; } p { font-size: 1.5vw; } Now i noticed a few issues with this approach: - The fonts unlike em's , rems and fixed width units like px , scale based on viewwpoints , now thats great , but has a huge drawback ,   the fonts that look good at 992px will scale to be so tiny at 448px width that they would hardly be visible.  - If you were hypothetically working for a design company where the
  • jQuery mobile navbar items not clickable on page loaded through $( ":mobile-pagecontainer" ).pagecontainer()

    I have created a simple index.html file in which there is only one button. On clicking the button $( ":mobile-pagecontainer" ).pagecontainer("change", "page2.html"); is called to navigate to page2.  After moving to page2, a navbar is present within it but the navbar items are not clickable. Below are the codes: index.html <!DOCTYPE html> <html>     <head>         <meta charset="UTF-8">         <link rel="stylesheet" type="text/css" href="jqm/jquery.mobile-min.css">         <title>Blank App Designer
  • .keyup(function()) don't work for me...nedd some help

    Okay, so I'm learning jQuery and using it under Ruby on Rails. In my index.html.erb file I have this: <form> <input id="target" type="text" value="Hello there"> </form> <div id="other"> Trigger the handler </div> And then in my script.js, I have this: $( "#target" ).keyup(function() { alert( "Handler for .keyup() called." ); }); However, when I type something in the input box, nothing happens...no errors either.
  • What's the best way to transmit a variable from one page to another?

    Hello, Could someone tell me the best way to transmit one variable from one page to another? can we do it by: $.mobile.changePage($("#P_Aliments"), {data: "id", value: "value"}); or by href="#link?id='value'" or ... and how can I retrieve this value the other side? Thans for your help
  • Uncaught Error: cannot call methods on page prior to initialization;

    I'm getting this error in the console: Uncaught Error: cannot call methods on page prior to initialization; attempted to call method 'bindRemove' It happens when I try to activate a panel widget. here is the markup (it has <?php ?> becouse it's part of a wordpress theme I'm working on) <!-- /panel --> <div data-role="panel" id="menu-panel">     <?php  wp_nav_menu ($args); ?>  </div> <!-- /panel open btn -->  <header data-role="header">     <a href="menu-panel">open</a>  </header>the page is http://ugauga.com/
  • jQuery slideDown() not actually animating

    I'm trying to use slideDown() when displaying dynamically created elements.  I find that the delay works, but there is no animation, the div just pops up.  I've set the width, I've read you need to have a fixed width in order for jQuery to run the animation smoothly, but that still has not helped.  I had no issues when using slideUp() when removing the element, only on creation with slideDown().  Any help would be great. $(document).ready(function(){          //Stop the form from submitting     $('#submit-form').submit(function(e){
  • Parsing JSON via getJSON or AJAX

    I'm quite new to jQuery. I'm trying to query JSON data via URL.  What is the difference between $.getJSON() and $.ajax()? If both works the same, which one allow me to specify parameters or attributes instead of putting everything on the URL? Thanks!
  • JQuery Ajax AND Form Post

    Hi, is it possible to have both jquery ajax and form post action so if the JQuery ajax failed for any reason then form will be posted via normal post action? Thanks, Jassim
  • JSON parsing

    I need help on why this jQuery JSON query is giving me some errors. If I put in a comment in the log, it works. The URL also works but when I tried to output the data, it doesn't. $.getJSON('http://api.openweathermap.org/data/2.5/weather?zip=55101,us&appid=44db6a862fba0b067b1930da0d769e98',  function (){ console.log(data); }); The errors: Uncaught ReferenceError: data is not defined(anonymous function) @ script.self-42c73cab471cc6fce85758d31965f2a5447440b79e37b9eaf5ce8a80e800805b.js?body=1:2fire
  • Jquery UI autocomplete accessing the search term

    Hi, The search event handler does not have any control over the search term. I came into this problem, when I just wanted to trim the search term before search is performed. But I could not do it inside the search event-handler. Can someone please elaborate it a bit? search: function( value, event ) { value = value != null ? value : this._value(); // always save the actual value, not the one passed as an argument this.term = this._value(); if ( value.length < this.options.minLength ) { return this.close(
  • background function

    I need a function which continuously runs in the background. it must have the following characteristics. 1) Does not interfere with other code which runs procedurally when the page loads or in response to specific events. 2) Can be started and stopped at any time. 3) Can be paused at any time (and of course started again where it left off) how can i do this
  • JSONP

    Can JSONP be used with any API/server which returns JSON or does the server have to support JSONP
  • Having trouble with changing an img src's content through a JSON file.

    HTML <img id = "changePic" src ="" /> JQuery $(document).ready(function(){     $.get("https://randomuser.me/api/", function(data, status){  $('#changePic').attr("src", data.results[0].user.thumbnail);      }); });Pretty much as topic says using the above JQuery function I have been unable to get the src to update to the url specified at data.results[0].user.thumbnail. Not really sure why it isn't so any help would be appreciated. Also, here is a JSFiddle that corresponds to the current code.  Thanks. 
  • jQuery UI 1.12.0 Beta 1 Draggable bug?

    In a fixed (or absolute) positioned element with either "bottom" and/or "right" styles set, Draggable does not work. It gets resized rather than being dragged. (tested on Win7/OSX/Chrome 47/Firefox). This works as expected on 1.11.4 but not in 1.12.0 Beta 1. Sample code: <!doctype html>                                                                 <html lang="en">                                                                <head>                                                                         
  • cross domain AJAX call

    I am attempting to make the AJAX call at the bottom of this post using JSONP The URL is a vocab server - it takes text strings and returns search suggestions. The (this).val() value is the content of a input box. When I make this call from Chrome with security turned off (so that cross domain restrictions are removed) it works. It does not work in normal mode because of the cross domain restrictions. I cant seam to get JSONP to work. I have tried copy/pasteing the following attributes from a different
  • Remove slide up animation and replace with hide and show

    Hello, http://poselab.com/en/jquery-tabs-with-animations-shadows-and-rounded-corners/ I liked how the tabs function in the example below. In the example it has a slideup and slide down to show and hide the content. I would like to get that animations replaced with reqular hide and show content.  it seems to be straight forward but I can't seem to make it work without ruining the css.  Please advise Thanks
  • datepicker month title not displaying

    I am using 1.11.4 version of the jquery UI with the smoothness theme. When I click the input field the calendar displays but the Title, Previous Month and Next Month elements do not display. They are there but appear to be in the same color as the background fill. Has anyone else seen this? Is there some work-around for this? I have tried setting color: in the .ui-datepicker-header CSS element in jquery-ui.css but it appears to have no effect. Thanks -david-
  • jquery file uploader not working in bootstrap modal (dialog)

    Hi, The jquery file uploader of https://github.com/blueimp/jQuery-File-Upload when included in the bootstrap modal does not function properly. The selected file is not displayed in the dialog box. However, when the same file uploader is used on a normal page without a dilaog box, the selected file is properly displayed. Could you please provide us any solution to handle file uploader in a bootstrap modal?
  • jquary datatable not working

    hi, we are using jquery datatable. its working fine. move to one server to another the  the datatable doesnt work. there response send correctly from server.  jquery.dataTables.min.js  Version:     1.9.4 pls help thanks
  • selector

    I am attempting to use the jquery autocomplete feature my code is based on the remote JSONP example. Useing chrome dev tools i have established that it does make the ajax request successfully. and when I manually resend the request I do get the expected response back. However the success: callback does not run. note that if i include a beforeSend: call in the same place as the success: call it does run also the error: callback returns ""jQuery1102008505786093883216_1453976870941 was not called" $(function()
  • $.mobile.navigate(...) vs (":mobile-pagecontainer").pagecontainer("change", ...)

    Hello. I've noticed there are 2 jqm-friendly ways to change between pages, what is the difference between them and which one should I use?
  • Syntax explanation for html()

    Hi Here is a code to get the background color when you click on a color: <!DOCTYPE html>  <html>  <head>  <script src="//code.jquery.com/jquery-1.11.1.min.js"></script>  $( "div" ).click(function() {        var color = $( this ).css( "background-color" );        $( "p" ).html( "That div is <span style="color:" +          color + ";">" + color + "</span>." );       });   <meta charset="utf-8">    <title>JS Bin</title>      <style>    div {      width: 60px;      height: 60px;      margin: 5px;    
  • BgSwitcher banner doest not appear in mobile view

    Hi all, Im using jQuery plug in which is BgSwitcher in my website but its does not appear in mobile view. Anyone know whats the problem.
  • using jquery datetimepicker with momentJs formats

    Goal: make jquery UI use momentJs formats that are used elsewhere in an existing large application. Issue: getting the utility functions parseDate and formatdate functions to do the work. I am wondering if I can get the widget to work with momentJs formats via the parse and format functions or if I have to write an elaborate mapper function to reconcile them. From reading the api docs, it appears that jquery expects only dates and formats that it understands internally If so, I can't be the first,
  • success or done for JQuery Mobile Ajax

    Hi, I want to ask what do you prefer to use when you send ajax form in JQuery Mobile? (success-error) or (done-fail)? Thanks, Jassim
  • content-security-policy flagging globalEval

    I'm implementing the header content-security-policy and cleaning up code as I go. My main sticking point on the javascript side of things is that jQuery-1.11.3 violates the eval policy: Uncaught EvalError: Refused to evaluate a string as JavaScript because 'unsafe-eval' is not an allowed source of script in the following Content Security Policy directive: "script-src 'self' Is there a way around this other than the unsafe 'unsafe-eval' policy? It seems to me that to go down that route negates a large
  • TypeError: view is null Line 5645 of jquery-2.2.0.js

    Just upgraded from 1.11.2/2.1.3 to 1.12.0/2.2.0 and I get the following error: TypeError: view is null https://hqcuiwebi2ms.area52.afnoapps.usaf.mil/i/jQuery/js/jquery-2.2.0.js Line 5645 Code:         // Support: IE<=11+, Firefox<=30+ (#15098, #14150)         // IE throws on elements created in popups         // FF meanwhile throws on frame elements through "defaultView.getComputedStyle"         var view = elem.ownerDocument.defaultView;         if ( !view.opener ) {             view = window;    
  • window doesn't close

    HTML <button>open window</button> <button>close window</button> <button>has i been opened then closed?</button> JS var myWin; $('button:first').click( function() { myWin=window.open('','myWin'); } ); $('button').eq(1).click( function() { if (myWin) { myWin.close(); } } ); PROBLEM If I click 'open window' button it opens a new window. If I proceed to click 'close window' it doesn't close. Why?
  • datepicker validation lets bad date text field get through

    My datepicker widget will let an incorrect date format through the second time it is filled in, giving the web surfer a "NaN" output instead of catching it and focusing on the datepicker text input field. What is my solution? Thank you greatly. sobriety calculator <script type="text/javascript"> $(document).ready(function(){ document.getElementById("warning").innerHTML = " ";     $("#datepicker").datepicker();     $("#datepicker").blur(function(){         val = $(this).val();         val1 = Date.parse(val);
  • 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