• simple problem

    This code works $("#aaa").click(function(){     $.post("insert.html",function(data,status){         document.getelementbyid('mas').innerHTML = data;   }); }); This code does not work $("#aaa").click(function(){     $.post("insert.html",function(data,status){         $("#mas").innerHTML = data;   }); }); The only difference is that i have changed document.getelementbyid to $("#mas") which i thought was the correct jquery equivalent. i expect that this is some tiny syntax error so what is the problem
  • How to change or replace array of array in jquery?

    My array is like this : var arr = new Array(); arr.push([1,1]);   // index 0 arr.push([1,2]);  // index 1 arr.push([1,3]);  // index 2   change value 3 to 5 arr.push([1,4]);   // index 3 Can splice() method be used for doing this?
  • Switch from grid view to list (and back) with a fade effect

    I have a category page that can be viewed in grid or a list. I want to add a fade affect when I switch between the views. How can I do that? Here is my js:     $("a.grid_view").click(function () {       $(".category_div").addClass("box_view");       $(this).addClass("active");        $("a.list_view").removeClass("active");     });     $("a.list_view").click(function () {      $(".category_div").removeClass("grid_view");       $(this).addClass("active");       $("a.box_view").removeClass("active");
  • How to remove array element?

    My arry is : var arr = new Array(); arr.push([1,2]); arr.push([2,2]); arr.push([3,3]); I want to remove no 2 element so i tried following methods arr.remove([2,2]); // not working i tried to get index of element but that also did not work arr.indexOf([2,2]);
  • Issues on Dialog in IE8

    Hi all, I'm trying to put a very simple dialog in an app, unfortunately it does not seem to work on IE8. The code is : $('<div id="dialog-confirm" title="Validate?">'+val+'</div>').dialog({                                  height:250,                                  width:400,                                  modal: true,                                  buttons: {                                      "Confirm": function() {                                          $(this).dialog("close");        
  • multi-page keeps CSS if using a href, but does not if using swipe

    When using jquery swipe, the CSS of the first page changes when showing the second page.  However, if I just use a simple link, it maintains the CSS.   Can someone please help explain what I am doing wrong to get this result?   Here's the basic code:   <!DOCTYPE html> <html> <head> <title>jtest</title> <meta name="viewport" content="width=device-width, initial-scale=1"> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link type="text/css" title="standard" rel="stylesheet" href="themes/jquery.mobile-1.2.0.css">
  • FlexSlider / need some fix

    Today a try add some extra animation into flexslider...that's everything is great the script work but need tune up for better working... So I want to explain this  - 1 The slider now used only for words animation  - 2 I want use animation like  Animate from left  step2  animate from bottom       step3  animate from top   - The problem what i found is when define the animation "Fade" or "Slide" The first step    animate with all effect but the next step olny slide or fade...  - I think is not hard
  • Pages not loading in Android 4.0.4 browsers / jQuery 1.8.2

    Hi, I just want to share this. I just migrated to 1.3.0 and found out that some of my pages is not loading in Android 4.0.4 all browsers (default browser, google chrome and firefox). It's working fine in Android 2.3.6. I don't have any idea about the problem but using the latest version of jQuery (1.9.1) fixed the problem. Thanks everyone for the great work!
  • remembering which columns to display

    Using JQM 1.3 table column toggle. How can I refresh the data in the table, or the whole page for that matter, while displaying only, or exactly, the columns that the user chose? 
  • Ordered list doesn't display numbers in Windows 7.5 mobile device

    Hi, In Windows 7.5 mobile device ordered list doesn't display numbers but shows zero (0) for every bullet lists. Do any one know the solution? Thanks in Advance. Chandra
  • Windows 7.5 mobile device text wrapping issue

    Hi, In Windows 7.5 mobile device if I in put email address too lengthy then on display screen, mail text is not wrapping and run off the side of the mobile screen. I have set style "word-wrap:break-word;"  to that html element but still its not working. Please help. Thanks Chandra
  • jquery carousel/slideshow for phpBB?

    Hello, How would I go about implementing one of these on my phpBB forum: www.lawstudenthub.co.uk As you can see, I have a number of small images in a row on the index page which I would like to turn into a jquery carousel/slideshow. Thanks.
  • RWD & jQuery Mobile Widgets

    This may be something obvious, as I'm new to jQuery & jQuery mobile, but how do I selectively use a jQuery Mobile widget? Specifically, I'm doing a mobile-first RWD site & I want to use the collapsible set widget (accordion) on smaller widths (in other words, on mobile devices). But I don't want to use the widget on larger widths (such as tablets & desktops). I wan to get a bit more fancy on those devices (progressive enhancement). I've tried Google searches & reading the docs, but as I'm not really
  • Changing type of input is now okay ?

    Hello, I was doing some research on changing the type of an <input /> using jQuery and I found multiple answers saying that jQuery forbids this as it doesn't work in IE. However, I tried it and it is working. Meaning, it doesn't throw an error and prevent me from doing it like my research said it would. Is this allowed in jQuery now? Is it supported in IE now by 1.9 ?
  • jQuery Mobile Opensource

    Hi, I'm new to this and have been playing around with jQuery Mobile code. Very good. love it. I've been doing a lot of reading about this, but can someone please confirm this. 1) Opensource jQuery is an opensource platform where I can use it to create website no problem right? no copy right issue? do I need to display any link back to jQuery for this? 2) jQuery library source I can freely download and use the script below for my website can't I? and build it from here. Do I need to make any reference
  • book layout, change only one page

    hi, i just started working with jquery mobile and have so far only used the "normal" multiple page layout as shown in the demo section. for a little project on the ipad (landscape), i would like to have two pages next to each other (like in a book) and be able to only change one of the pages by clicking on a "link".  Is this possible with jquery mobile and if so how is it done? if you could provide me with some links i would be very thankful cheers katzenjammer12
  • Create an event dyanmically, after reading a text file

    I am trying to setup a html which performs the following: read a text file from the server using data in that text file, create dynamically buttons in the html page (say, one button per line) assign a handler for the click event in every button, triggering the same function for all of them, but changing the data passed. I got to work if I create the buttons without reading from the server, so using a internal variable that handles the values .... but, when getting to the file, I am able to read the
  • The function definition.

    From http://learn.jquery.com/javascript-101/scope/ I do not understand why the first one is better than the second? // Functions can see changes in variable values after the function is defined var myFunction = function() {     var foo = "hello";     var myFn = function() {         console.log( foo );     };     foo = "world";     return myFn; };   var f = myFunction(); f(); // "world" var myFunction1 = function() {     var foo = "hello1";     var myFn = function() {         console.log( foo );  
  • toggle() behavior

    Hello, I wonder if there is a way to modify the toggle() behavior. Currently I use a link to show/hide a vertical menu: $ ( '#link' ) . click ( function ( ) {        $ ( '#mydiv' ) . toggle ( ) ; } ) ; It works but the effect is something odd, It looks like a fade plus a horizontal scroll which doesn't fits with my vertical menu. I would like to make it scroll from the top to the bottom. Is it possible? Thanks in advance.
  • Is it possible to control a scrollable jquery ui dialog using keys (PgUp, PgDn, … spacebar?…)

    I have a jQuery UI dialog that has enough content to trigger the appearance of vertical scroll bars. I found that the only way to make it scroll was to either click-and-drag the scrollbar, or click in the scrollbar area - i.e. it was not possible to make it scroll using the PgUp or PgDn keys, nor the arrow keys or spacebar, etc. What would be the best way to enable keyboard activated scrolling? [Note: I'm actually using an enhanced version of the jQuery UI dialog (http://www.fieryprophet.com/demo/jqui-dialog-minmax/)
  • broken image problem

    Can someone help how to fix broken image problem in jquery, I can see the broken image icon on my browser after refresh and If I right click on that broken icon and go to properties it shows that it is the right Image but it does not show the image itself rather it shows only the broken icon of that image. I did try it on all browsers, firefox,chrome,IE and is not cache problem. This is the website, http://worldmarketing-site.com  
  • Implementation of the TouchSwipe-Jquery-Plugin

    Hi, I'd like to use the TouchSwipe-Jquery-Plugin (https://github.com/mattbryson/TouchSwipe-Jquery-Plugin) to insert a value into an input field from a tablet. The value must be between 0 and 12. I'd like that if I swipe right, every 50px of swiping, the value add +1, until the maximum value (12). If I swipe left, every 50px of swiping, the value subtracts -1, etc... The second implementation that I'd like to insert is a clickable button that add +1 to the value. Can you help me to write this script
  • Problem with Jquery Cycle plugin.

    I am using this cycle plug-in and the console is showing this error: Uncaught TypeError: Object #<Object> has no method 'easeOutBack' jquery.min.js:16 d.fx.stepjquery.min.js:16 gjquery.min.js:16 d.fx.customjquery.min.js:16 (anonymous function)jquery.min.js:16 d.extend.eachjquery.min.js:16 (anonymous function)jquery.min.js:16 d.extend.dequeuejquery.min.js:16 (anonymous function)jquery.min.js:16 d.extend.eachjquery.min.js:16 d.fn.d.eachjquery.min.js:16 d.fn.extend.queuejquery.min.js:16 d.fn.extend.animatejquery.min.js:16
  • Is it possible to put a function that returns a promise inside a click handler

    Kind of like so, $('#sbItems a').on('click', function (e) {                          e.preventDefault();                                               // Do stuff                       urlId = stuff;                       function citeAjax(urlId) {                           return $.ajax({                                          type: 'GET',                                          url: 'https://www.sciencebase.gov/catalog/itemLink/' + urlId + '?format=jsonp',                                         
  • Changing div tag order

    Hi, I would like to change the div tags order. I have written below my html codes.  Existing div tags in html page. <div id="main">       <div id="divone">Content for div tag one</div>         <div id="divtwo">  Content for div tag two  </div>         <div id="divthree">  Content for div tag three  </div>         <div id="divfour">  Content for div tag four  </div>     </div>  I would like to change the order of the divs like, <div id="main">       <div id="divone">Content for div tag one</div>  
  • why is this script breaking

    Hello: I'm using a slideshow on my site called BarackSlideshow 3.0, a jquery application. I'm using the free demo version. What i am trying to do is attach a link to an image when it briefly comes across the screen that directs to the appropriate url. but every time i try to link more than two URL's to the images in the presentation the script breaks. I do not know how to demonstrate the code that is giving me the blues but here is the address where the script is located:  [url]http://www.devthought.com/2008/06/11/barackslideshow-an-elegant-lightweight-slideshow-script/[/url]
  • JQM, Jquery Form Plugin, and returning to original state

    Trying to submit a form using Jquery Form Plugin. I can refresh the div with the original div upon submitting successfully, but I am loosing all JQM markup. What should I do so that it returns to the same original state before submitting the input? <script> $(document).ready(function () { var options = { target: '#audcontent', beforeSubmit: showRequest, success: showResponse                   $('#audform').submit(function () { $(this).ajaxSubmit(options); return false; }); }); function showRequest(formData,
  • Jquery conflict, one script won't work with another

    I have jquery script for menu (lava lamp http://www.htmldrive.net/items/show/439/LavaLamp-jQuery-Sliding-Menu.html) and other for gallery http://lab.hisasann.com/jStack/, how to enable both of them to work? The problem is within menu bar hover floating highlighter it doesn't appear at all. I don't know how to enable both of them. My code: $(function() { $("#lava_menu").lavaLamp({ fx: "backout", speed: 700 }); }); <!-- syntax --> <link rel="stylesheet" href="http://hisasann.com/housetect/js/dp.SyntaxHighlighter/Styles/SyntaxHighlighter.css"
  • Question about Spinner in .NET

      I'm somewhat new to jQuery, been using .NET for a long time. I'm using the spinner box and trying to get the selected value on the server side, does anyone know how to do this?   Its easy enough to set the UL to runat=server, then the UL is available as an HtmlGenericControl in a button click event.   I tried sel4.value , but 'value' isn't available for HtmlGenericControl. Any suggestions would be helpful.   <ul id="sel4" runat="server" class="ui-spinner-box"> <li>Monday</li> <li>Tuesday</li> <li>Wednesday</li>
  • Jplayer audio works in Live mode of DW CS6 but not browsers

    Hello, I am having issues with my first attempt at utilizing Jplayer. I followed the beginning tutorial to a T and currently have my audio player displaying and displaying in Dreamweaver CS6 Live Mode. Works really well but when I go to preview in a browser from DW Safari, Opera, Chrome and FireFox all open the site with a code type list and the following:  To play the media you will need to either update your browser to a recent version or update your <a href="http://get.adobe.com/flashplayer/"
  • How can I use promise.done() with a function that accepts an argument to use in the ajax url to be returned ?

    I've done this succesfully without the argument but if I wanted to put an argument in to be used in the url could I do, function citeAjax(urlId) {     return $.ajax({                    type: 'GET',                    url: 'https://www.sciencebase.gov/catalog/itemLink/' + urlId + '?format=jsonp',                     jsonpCallback: 'getSBJSON',                     contentType: "application/json",                     dataType: 'jsonp'                }); } var citePromise = citeAjax(); but I'm not sure
  • two cities

    Hello, I'm using this plugin: http://jqueryui.com/autocomplete/ # remote-jsonp how do I change it to insert two cities (birth and residence)?
  • JQuery Form

    Hi! I am new in jQuery and AJAX and I need a simple code of Image upload and some data upload on the db and showing without refreshing the page, I am using WAMP and phpMyAdmin So send mysql file too! I shall be very thank full to you!
  • 2 problems with this code - show with IE does not work and live() issue

    Hi Guys I have 2 problem first problem is that IE is not showing a div when i ask it to do .show() but all other browsers are working fine.on line 350 i have added .css({"visibility":"visible"}); to hopefully fix this issue but it did not. second problem is Uncaught TypeError: Object [object Object] has no method 'live' I get this problem in line # 598 of my code below I am using jQuery1.9.1 if this matters. Thanks for your help I have attach my code in a zip file because the form does not allow
  • javascript onclick call in jquery ui tab not working

    I have a page where I'm using jquery ui tabs and in each tab I am displaying a table of data that has an onclick javascript function call for each row of data. When I click on a row in the table my javascript function is not working any longer and I am getting the error "TypeError: $.prompt is not a function". This code worked before I put the tabs on the page. Any suggestions?
  • code optimization

    How can I optimized the following code ? thanks $.fn.testing=function() { var find = '#' + $(this).attr('id') + ' > li'; $(find).bind('mouseover', testing_mouseover); }
  • Error $.browser.msie in version jQuery 1.9.1

    Error $.browser.msie in version jQuery 1.9.1 Uncaught TypeError: Cannot read property 'msie' of undefined. If I use version jquery-1.8.3 work no problem.
  • jQquery UI Autocomplete

    Hi guys! I've used jquery-ui-1.8.20's autocomplete and it used to work fine.  Then, I changed it to jquery-ui-1.9.1, and it failed. I'm using not only autocomplete of jquery-ui-1.9.1, but other features too, like dialog, so I don't want to have 2 versions of jquery-ui in my project. Here is my code:  $("#searchBox").ready(function () {         $('input[id$="txtPredictiveSearchBox"]').autocomplete({             minLength: 1,             delay: 200,             autoFocus: true,             highlight:
  • Can't use data returned from ajax call in seperate .js file ????

    I've been trying to figure this out for a long time (and thanks to those here who have helped) and I'm slowly getting how promise works in jquery (at least I think). My issue still seems to be using the return in another file... So I have a file called request.js with this code, function testAjax() {     return $.ajax({                   type: 'GET',                                          url: 'https://www.sciencebase.gov/catalog/items?parentId=504108e5e4b07a90c5ec62d4&max=60&offset=0&format=jsonp',
  • autocomplete: prevent close when hiding virtual keyboard on mobile

    I'm using the jQuery UI autocomplete in a jQuery mobile page (so I hope I used the right forum, it might be a bit of a border-line case but I think I should fix the issue within jQuery UI). When I use the page on a mobile device the autocomplete box pops up and technically it works as expected. Now my problem is that there might be only very little screen space and the device's virtual keyboard takes up a lot of space. I'd like to close the virtual keyboard with the built-in button. My problem is
  • 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