• Styling of a select list box as a navbar item

    I'm using a navbar that contains multiple links.  The navbar always has three links but could potentially have 2 to 3 additional links in certain scenarios.  Instead of cluttering up the navbar with too many options I would like to add a select list box as an additional navbar item as a "More" option to display additional navbar options.  I can add the list box without a problem as a fourth element of the navbar and it works as expected.  However, the listbox ends up with the standard rounded corners
  • How can I disable sunday's on datepicker?

    I'm creating a restaurant website, and I was doing the reservations page and decided to use the datepicker plugin to pick dates. I was wondering is there a way to disable sundays on the date picker, and also, the restaurant has different hours on Saturday then the rest of the week. So my question is, how can I disable Sundays and is there a function which lets me determine the day of the week? My thoughts: I was thinking of having the datepicker use the Full format (DD, d MM, y). Then using javascripts
  • long polling question

    I'm trying to create a basic app which uses long polling. So, my site makes an Ajax request to my server. My server script loops (10 seconds long) and checks if there's new data. If there's new data availible, it returns a JSON string and the new data is immidiately displayed on the webpage.   But the problem is, when the Ajax request is made to server and no data comes in for 10 seconds, then that means it waits 10 seconds. In those 10 seconds i can't click on any other links in my webpage. It sits
  • getting content of a page by ajax or php

    hi i have a page that its content loads by jquery ajax, i mean i have this code at the end of my page: $(document).ready(function() {        $.ajax({              type: "POST",              url: "inc/content.php",           data: ({'content_id':5}),        }); });recently i found out google robots could not run this code, so the page content (that come from content.php file), wasn't considered by google. so i think my only option is to get content by php, what is the equal php code for getting a
  • Odd Behavior With Header Div only on Some Pages

    I'm struggling with formatting in the: <div data-role="header"></div> Section of my page. I'd like all pages except the landing page (/) to have a header bar, and simply leaving out the header div seems to work fine for that page. When other pages load, they also look fine. But if I go "back" to the home page, the content <li> floats over the image I'd like to display. My front page looks something like: <div data-role="content"> <img src="/some/image/path/image.jpg" style="width: 100%;" /> <ul data-role="listview">
  • Form disappears before mouse can get to it

    I have an item at the end of a menu that when it is moused over, it makes a form visible underneath it. On some machines running Safari the form flashes on and of on hover, and disappears when the mouse leaves the trigger. I can get it to happen in Firefox if I move the mouse super slow from the trigger word to the box. I've tried moving the log in box closer with css, and it still happens. here is the javascript:     $(document).ready(function(){                var both = $(".both");         var
  • firing code when an element is appended to

    Hi Folks,          Say i have some container elements on a page which get other elements appended to them dynamically as a result of various events scattered throughout the javascript in the page... is there any way of attaching code that would get fired for that container whenever something gets appended to ( or deleted from) it ... like the change event for text boxes but much more generic? Cheers,        Robin.
  • A bunch of JQuery Mobile tutorials and articles

    I've kept myself busy on my blog keeping up with JQuery Mobile and have several tutorials/articles that might be of use for some people on this forum: Submit a JQuery Mobile form via AJAX with PHP Build a simple chat web app with JQuery Mobile and NowJS (a module for NodeJS) Create a blog with JQuery Mobile and ASP.NET MVC 3 with C# Create a basic project layout using JQuery Mobile, ASP.NET MVC 2 and HTML5 Using AJAX with JQuery Mobile Using the HTML 5 Canvas with JQuery Mobile Create a blog with
  • jCrop, an unusual requirement, and strange behaviour

    jQuery 1.4.4, jCrop 0.9.8 I'm trying to make it so that I can have sort of a "floating" aspect ratio, in that the final image width is fixed, but the height may be between 2 values. I also need to avoid increasing the size of the cropped image so I'm using the minSize option. I thought that I might try setting the maxSize depending on the current aspect ratio, although I'm unsure whether changing that value is possible on the fly. I've been trying to determine that but have been stalled on something
  • Tabs: Are ID's required?

    From the documentation I found, it seems they are.
  • iPad Home Screen version not rendering

    We're using jQuery Mobile for an iPad web app.  We're having problems running the app in "full screen" mode, namely, full screen mode doesn't work.  Running it in Safari results in the address bar being visible, and using the "add to home screen" functionality causes further problems.  When using the HTML5 doctype, the page simply seems to render as plain text (none of the stylesheets or javascript files are loaded).  Instead, using the XHTML 1.0 Transitional Doctype causes the page to render correctly,
  • Extract URL from a list item newbie question

    I am a total newbie as far as jQuery is concerned so this may be obvious to those with a little more experience but I have inherited some code which provides an autosuggest list as an HTML list .. the items in the list can be highlighted using the up and down arrow keys and if you click on a highlighted item using the mouse a new URL can be triggered.  What I want to be able to do, though, is also allow the user to hit ENTER on the selected item and fire the URL that way. This seems to be the bit
  • Alpha 4...Error in Internet Explorer after upgrade...using jQueryMobile and ASP.Net.

    Hi... Anyone using jQueryMobile and ASP.Net. I am getting an error after the upgrade to Alpha 4. Getting a JS error, "Error: Exception thrown and not caught". I do not have this issue with an iPhone or Android based phones. Only on Windows Mobile 7 and also Internet Explorer 8 on desktop Here's my simple ASP.NET page below. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head>   
  • Forms on Windows Mobile 7

    Has anyone managed to implement a form successfully on Windows Mobile 7? I'm using an HTC Spark / Trophy and whenever the phone sees an input tag, a blank page is returned.  Strangely the code works on the jQM site, but when I place the code from the forms test page on either my own machine or my server, it has the same problem - input tag results in blank screen. The response is coming back the same but even if I set: $.mobile.page.prototype.options.keepNative = "input"; - to override the jQM element
  • does .empty() erases correctly even jquery events and plugins?

    In my application the user must be able to choose several types of "time frames" depending on the selections previously done on other controls. What I'm doing now is filling a couple of div with different components (input boxes, datepick widgets, jqueryui sliders, multiple selection boxes) and creating the relative events depending on the selections done. Now, should the user change his selection, I need to erase and re-do everything inside the 2 div tags. What I'm asking is: will jquery's .empty()
  • AJAX file upload in IE9

    Hi all. I recently downloaded jQuery Form Plugin from http://jquery.malsup.com/form/ and started using it for ajax file upload in my Graphs application at http://www.flipcom.cz/graphs/. File upload works fine in FF, Chrome and Safari. It does NOT work in IE9 :-( It simply never reaches 'success:' within 'ajaxSubmit()' function. I found out something about XMLHttpRequests and iFrames, tried to adjust the code but with no luck. Any help greatly appreciated! Thx! BugsBunny
  • Reading Cookie

    I have a cookie that has a nice amount of json data in it and I need to read from this cookie an create some variables with values. etc. First, how do I read the cookie using JQuery?
  • Is this a regression or a known issue in 1.4.3+ and IE7/8?

    Hi guys, I'm one of the developers of WordPress. We use jQuery a lot in the admin. There's a problem that surfaced after upgrading from 1.4.2 to 1.4.4. This problem still exists in 1.5.1 and 1.5.2RC. On the Edit Page screen in WordPress admin we have a drop-down containing all published pages. If the number of entries there is more than 300, IE7 and IE8 show an "Unresponsive Script" error when trying to use the drop-down (clicking on it). If the number of entries is just under 300, the drop-down
  • issue with sortable and containment

    The following sortable grid works for me: #sortable { list-style-type: none; margin: 0; padding: 0; } #sortable li { margin: 10px 10px 10px 10px; padding: 1px; float: left; width: 440px; height: 440px; } <script> $(function() { $( ""#sortable"" ).sortable({ }); $( ""#sortable"" ).disableSelection(); }); </script> <div class="widgetcollection"> <ul id="sortable"> <li class="ui-state-default" id="1">some stuff</li> <li class="ui-state-default" id="2">some stuff</li> <li class="ui-state-default" id="3">some
  • Has anyone ever gotten UI to work with css transitions?

    Setting -moz-transition (ff4) for a class while having a UI animation trigger causes it to no longer animate, it just jumps straight to the end. Is there any workaround to allow a class to have transition and use it for animations?
  • siblingCheck Causes Unresponsive Script Message in IE8

    In IE8 when there a lot of siblings, the while loop within causes the unresponsive script message. I am seeing this when it is called from within sortOrder. Since IE8 does not support compareDocumentPosition, sortOrder is defined to make calls to siblingCheck
  • A4 problem with ui-li-aside

    I'm having a problem with the list ui-li-aside style in A4. It worked pretty good in A3, but after switching to A4 it leaves a noticeable gap on the right side, which leaves less room for text and makes the display harder to read. Here's a simple example, with the screen shot below comparing the same layout in A3 vs A4. Is anybody else having this issue? Is there a work around?     <div data-role="content">       <ul data-role="listview" data-theme="d" data-inset="true" id="Details">         <li
  • horizontal and vertical orientation event

    After I posted a fix suggestion I implemented a event to facilitate my work. When the orientation is horizontal or vertical. Should be nice if these events come implemented in jquery mobile My implementations to this: after including the jquery script, I added..         $(function() {     var setOrientation = function() {         if (window.orientation === undefined) { // desktop             return;         }                 if (Math.abs(window.orientation) == 90) { // horizontal             $(document).triggerHandler('onHorizontalOrientation');
  • Prevent browser errors when getting 404 responses on xhttprequests?

    I have a use case where i send several requests via $.ajax, where some of the calls return a 404 status code. This is fine for me, as i can simply ignore them. My problem is, that at least chromium complains about resources that failed to load. I know this is not directly a jquery question, but i'd like to prevent the error from bubbling to the browser. any ideas?
  • Refreshing datepicker

    I am setting the date of the datepicker programmatically under certain conditions. For example, I have an "arrival" and a "departure" input (type=hidden), each with their own datepicker. If the arrival is later in time than the departure, my code is automatically updating the departure to 1 day after the arrival that was just set. My issue is that my datepicker for departure does not highlight the selected date. It works fine if I *use* the departure datepicker to manually set the date, but when
  • Alpha 4 - orientation change CSS don't work in android [FIXED]

    in my phone (Motorola Defy - android 2.1-update1) don't work the change class (portrait landscape) in orientation change. To fix it I added after the jquery.mobile-1.0a4.js the code: $(function() {     onChangeOrientationResize = function() {         $('body').removeClass('portrait landscape').addClass(window.orientation ? 'landscape' : 'portrait');     };                if ("onorientationchange" in window === false) {           window.addEventListener("resize", onChangeOrientationResize, false);
  • .load() doesn't work on iPhone fullscreen webapp when using 3G - jQuery 1.5.2

    Hi, yes, that sounds like a strange problem and I think it really is. I observed the following behavior after upgrading to jQuery 1.5.2: When my webapp runs in fullscreen mode on the iPhone and connected using 3G, the .load() function doesn't seem to work.  When using in mobile Safari (normal mode) or connected through WLAN, it works as expected. When downgrading to jQuery 1.4.4 it runs in 3G and fullscreen mode. I have no idea how to analyze that problem further, as I cannot read log messages in
  • Need to self host jQuery code

    My testing worked well in my own "http" testing environment, but the production server I am moving to throws a warning that "page is calling out-side secure environment..." that is not in the same https. My options are to self host jQuery or find another solution.  I clicked "down load code",  cut and pasted it into bb edit, saved it with the suggested file name to a directory on the production server, called the script in the head with a path copied from other <script> loading tags - but jQuery
  • Problems with jquery ui plugins Dragable and Droppable in firefox 4

    I have a problems with Draggable and Droppable plugins in fierefox 4, When I drag an item that does not stop and keeps moving with the mouse Thanks.
  • checkbox toggle (mobile)

    I'm trying to trigger a toggle event from a checkbox using jQuery mobile.  Here's a simple version of the html: <input type="checkbox" name="someName" id="someName" checked="checked" /> <label for="someName">Some Named Label</label> <div class="hiddenByDefault">  -- content that's hidden by default and displayed when the checkbox is unchecked -- </div> Here's the JS in it's simplest form (not working): $(".hiddenByDefault").hide(); $("[name=someName]").change(function () {   $(".hiddenByDefault").toggle();
  • jQuery UI Tabs and absolute links

    Hi. I have Tabs installed in a webpage and have run into a curious problem regarding links. One of the tabs (REGLAS) is a link to an external html file with simple plain text (no code). The original file is located in a subdirectory, which is also a subdomain. You can access this directory in one of three ways: http://eventos.canariaspoker.org/champions.php http://canariaspoker.org/eventos/champions.php http://www.canariaspoker.org/eventos/champions.php Due to some problems I had with relative addresses
  • How can i use jquery ui tabs with tiles frame work?

    Can somebody give me or point to a simple tutorial for using jQuery UI tabs with Spring MVC and tiles framework? Thanks
  • soundcloud jquery plugin clash

    Hi all this is my first post and I only stumbled upon jQuery mobile last night. here's what i'm working on: ctek.dj  I got everything up and running fine on a basic wordpress multisite installation and I really ilke jQuery mobile, I have absolutely no jQuery knowledge but was able to get this up and running very quickly. My problem is with the soundcloud jquery players, you can see one on my site here. When you click 'play' jQuery mobile tries to open #play which results in an "Error Loading Page"
  • proplem with jquery code when i add a selector

    hello i have a proplem with this code when i add my selector #nav   $(function() {     $("#nav ul > li").hover(function() {       $(this).find("ul").stop(true, true).fadeIn('fast');     }, function() {       $(this).find("ul").stop(true, true).fadeOut('fast');     });   });but when i remove my selector #nav  it's work   $(function() {     $("ul > li").hover(function() {       $(this).find("ul").stop(true, true).fadeIn('fast');     }, function() {       $(this).find("ul").stop(true, true).fadeOut('fast');
  • Documentation pages broken?

    Is it just me, or can no one else see the content of the documentation pages? http://api.jquery.com/category/traversing/   All I get is a blank window. I've tried multiple browsers on multiple computers with no difference.
  • JQuery Validate and web services

    Hi, I am using the Jörn Zaefferer Jquery Validate plugin, but I seem to be having issues when I try to call web services using JQuery on the same page.  Instead of making a normal call to a web service : http://localhost/Services/CDServices.asmx/GetAllUserProfiles It does this : http://localhost/Services/CDServices.asmx/GetAllUserProfiles?callback=jQuery15109683126045224081_1302011466636 Is there any way to prevent this?
  • Question: .replaceWith() for replacing both tags and texts

    I'd like ask why in the below example, "GOOGLE" is repeated three times, which is not intended. What I just want to do is to remove the <a> tag thru jQuery. <script> $(function(){     $('a').replaceWith( "<div>" + $(this).text() + "</div>" );     }); </script> <a href="#">GOOGLE</a> <a href="#">GOOGLE</a> <a href="#">GOOGLE</a>And how about replacing the text "GOOGLE" with any other texts? Is that something like this? <script> $(function(){     $('a').replaceWith( "ANYTHING" );     }); </script>
  • JQuery tabs in IE not showing pictures

    The problem I am having is that my pictures do not show up in the dynamic JQuery tabs in IE8 and below, but they show up in every other browser. I believe that it is associated with how the tabs load using JQuery because the pictures show up fine when I do not load the code. I used JQuery .hide() and fadeIn() functions in order to change tabs. Here is a screen shot of what I am talking about: http://www.marinicorp.net/jquerytabs.htm If you need anymore information just let me know. HTML Code:    
  • How to get element index in dynamic form

    Hi I try to make a dynamic form with inputs depended on selects fields. My method works in static form but I don't know how to use it in dynamic one. JSON function ( to control correct input with select)  $(document).ready(function() {                         $('select.sf').change(function() {                         var z = $("select.sf").index(this);                   $.getJSON('ajax.php', {option: $(this).val()}, function(data) {                     $("[name^=jed]").eq(z).val(data.inputValue);
  • maphilight and general behaviour

    Hi, I have an image with a bunch of coordinates on it that I highlight with the maphilight plugin and it really works great but my problem is when I want to do a simple animation like showing a piece of text. When I hover over an area the piece of text that is related to the area being hovered should show, simple, yet I can't get it to work. The other piece of code I used in other projects and it worked then so I guess my real question is, how do I make the two elements work together. HTML <script
  • 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