• Performance issues using $.ajax async

    Hello, I am using JQuery on a embedded system which use webkit as browser, i detect that jquery for asynchronously ajax calls use polling: 3620: var ival = setInterval(onreadystatechange, 13); instead of: xhr.onreadystatechange = onreadystatechange; for my scenary this has performance issues, i like to know why jquery use the first option when the second could be used. Thanks and sorry for my english. --
  • [jQuery] 3,6,9,12...

    I'm trying to find out how to add a class to every third occurrence of an element. Basically, I have a DIV with an undefined number of DIVs inside of it, and I want to add a class to every third DIV
  • Autocomplete request object in source callback

    Hello, Is it possible to get the request object in the source callback of the jQuery UI autocomplete function? Example: $("input[name=q]").autocomplete( {             source: function( request, response ) {                   ... get request object that calls this function ...             } } ); It is possible in the focus(), select() and change() function, but why not in the source? Or am I missing something? The variable request only contains the term property. Calling $(this) will give me the jQuery
  • Ajax structure in JQM: impossible to monitize site w/ads?

    Hi all, I'm trying to incorporate ad networks into my JQM site have not been able to find anything resembling an elegant solution.  Most ad networks (such as Google Adsense, GreyStripe, and Admob) simply require that you copy/paste a few lines of JavaScript where you want an ad to show.  This works on the first JQM page but fails on subsequent pages due to the way JQM loads pages via Ajax. I've been browsing the forums and found others with the same issues.  As more people start evaluating JQM, I
  • Implement CSS

    This might be a bit of a noob question, but I'm not that familiair with Javascript, so I'm not quite sure how this code works and executes. I'm currently working on building a webapp using HTML5. I've followed some tutorials and so far I've come up with the following for the layout and infrastructure, only the first link works, and the top(back) button: http://www.haragara.com/html5test/ Now during my research I've come across Jquery mobile, this seems like the perfect sollution to make my webapp
  • Changing css of :after pseudoclass

    Hi, In my stylesheet have a css rule for an element with the :after pseudoclass. Is it possible to change the this CSS with jQuery? For example, in my CSS I have .price:after {       content:" EUR";       font-weight:bold; } When I try the following in my JavaScript file $('.price:after').css({"font-weight":"normal", color:"blue"}) nothing changes.
  • [jQuery] jQuery i18n

    Hi guys, i need to develop an aplication with i18n, so i want to ask you what do you think is the best way/plugin to accomplish i18n l10n with jQuery? by the way, i need to have multiple languages,so a bilingual solution won't work for me :/
  • Pull down to Refresh - touch drag to make server call.

    Hi, I was working with jQuery mobile and had thought in my mind to create some sort of UI to make server request. the UI looks like(i tried!!) Twitter app or facebook app refresh style. I have demo running, which uses the jQuery UI drag to accomplish this. Note that this is only proof of concept, UI is working but there is no server call. try it on mobile device. I have tested it on iphone , ipad. click here to see Demo screen shots: Let me know what you think. thanks Project9
  • AjaxUpload: why have to click twice?

    Hi all, The code below  uploads files to the server using AjaxUpload.2.0.min.js But you need to click several times on the “Add File” button for the OS window (where to pick the file you want to upload) to show, instead of clicking just once. Also,  if you click once in the link and then you move the mouse out of the red area and click (out of #upload_files), and  last you click back in the link, it works, the OS window opens .. but why do I have to do this? Is that AjaxUpload will not be initially
  • JQUERY UI theme images for a button

    How can I create a UI button with a down arrow icon from the icon sprite? Is this possible?
  • [jQuery] [Validate] hide errors until field has focus

    I am probably missing something, but I would like to with the Validation plugin be able to hide the errors and when someone blur/ focus/clicks on the field then they see it. I am basically emulating Flex/CF Flash forms in error display. I do have an ancillary question which is Ideally would like to place the error message next to the field that threw the error. I think my jQuery knowledge is lacking because I am not sure within errorPlacement do this error.appendTo( element ); and perhaps this is
  • [jQuery] [validate] display errors with a transition...

    I've just started using jQuery validate and as seems to always be the case when trying to add new functions and learn new stuff... I'm on a deadline. My designers really want me to have the validation "slide up and slide down when the messages display. They have also want the error messages to float over the existing design and not mess with the page layout. Is there some way I can use the combination of options available with validate to accomplish these animated transitions for displaying the user
  • Remove Sortable Tabs

    While creating a sortable tab, i've tried to remove one of the tabs and encounter a problem. The remove method refers to the panel and list array by index. While changing order of tabs the reference is not pointing to the right tab. i think it would be better to remove by idPrefix, same as selecting tabs.
  • Issue closing a dialog that contains an iframe.... from within the iframe

    I have a function which takes a url and opens a jquery dialog. I've used it in a few places and it works fine where the dialog doesn't need to be closed programatically. function ModalFramedDialog(winTitle, url, winWidth, winHeight) {   $('<div id="myAdhocIframeDialog" style="overflow:hidden;"><iframe id="myAdhocIframeWindow" frameborder="0" width="100%" height="100%" src="' + url + '" /></div>').dialog({     title: winTitle,     autoOpen: true,     width: winWidth,     height: winHeight,     resizable:
  • jQuery simple expand/collapse list: problem in IE8 with static page height

    Hi there, I'm a bit new to jQuery and have been trying to make an expand/collapse (essentially accordion) list. So far, everything works and looks fine in Firefox, Safari, and Chrome, but in IE8, the page height is static when it loads, with a page height being as if all headers in the list were expanded. The expand/collapse functionality works, but as you can imagine, there is this big gap of space after the list. The html markup uses <h2> tags for the always-visible header portion and a <div> for
  • Any+time

    Hi I am using this amazing plug-in for my site : http://www.ama3.com/anytime/ But i need help, if possible, to setup time only from 6am to 9 pm to be selectable if possible. I did try some different settings but non of them worked. I am using this so far but missing that range so if somebody can help me please. <script type="text/javascript"> AnyTime.picker( "field1", { format: "%a %b %D %z.", firstDOW: 1 } ); $("#field2").AnyTime_picker( { format: "%h:%i %p",} ); </script> thank you in advance!
  • Disabling a double click on a submit button

     Greetings, I wrote a simple jquery snippet to prevent a double click on a submit button and it works. Button id = 'swl_submit'.<script type="text/javascript">  $(document).ready(function() {     $('#swl_submit').click(function(){          $(this).attr('disabled', 'disabled');        setTimeout(restoreButton,1000);     });  }); function restoreButton(){     $('#swl_submit').attr('disabled',''); } </script> This works fine.  Then, I thought I could shorten this up a bit by adding the code in my restoreButton
  • [jQuery] Calling WCF services using jquery?

    Hi All, I'm wondering if anyone can advise me or steer me to some useful links... I'm doing some research about MS WCF 3.5 web services and how it can be used for json-based web services. All of the examples I'm finding use the asp.net ScriptManager tag on a server side page so that a js proxy for the web service methods gets created on page load. I don't want to use asp.net for page generation. I'm looking for an example of how to use jquery in a non-asp.net rendered page to make calls to the WCF
  • Can datepicker calendar show more than 10 years

    Hi,   I am using jQuery datepicker for users to pick birthday, here is my code:   $('#DOB').datepicker({ changeYear: true, maxDate: new Date(), showOn: 'both', buttonImage: '/images/calendar.png', buttonImageOnly: true });   Since the birthdays are typically tens of years away, so I allow the users to change year to save clickings, but the Year selection drop down only show 10 years range, say this year is 2010, the dropdown will have 2000 - 2010 to begin, if I pick 2000 then 1990 - 2000 will show
  • add fadein to jquery validate error messages

    How to add fadein() in the jquery validate label error messages? I've tried the following: $("label.error").hide().fadeIn("slow"); $(this).hide().fadeIn(1000); but neither of them work. Can anyone please help me? Thank you. The code I've used: $(document).ready(function(){ $('#my_form').validate({ rules:{  name:{  required: true } }, messages:{ name:{  required: "The field is mandatory !" } } }); $("label.error").hide().fadeIn("slow"); $(this).fadeIn(1000); });
  • changePage doesn't work after submitting form

    i have a page with a form. submitting the form goes like this:  $("#add_form").bind('submit', function(event){  event.preventDefault(); $.get('/~polling.php', {poll_type_select: $("#poll_type_select option:selected").val(), question_input: escape($("#question_input").val()), end_select: $("#end_select").val(), multi_string:multi_string, target_select: $("#target_select").val(), type: "add_poll", user_id:user_id}, function(data) { alert(data); $.mobile.changePage($('#list_page'), 'slideup', true,
  • How to detect combination keycode

    $(document).keydown(function(e) {       console.log('key code is: 'e.which); });I know how to find out which key user use, but how to do it when they use combination key? for example: "CTRL + C", "CTRL + V" and so on.
  • GMap in jQuery modal dialog problem - can't drop draggable markers

    Hi, I am using jQuery 1.4.2 with a custom jQuery UI 1.8.6 (from themeroller), and have ran into a problem with draggable GMap (GMaps API v2) markers in a modal dialog where I can pick up the marker with a mouse click but it appears that the mouse up event is lost so I can never drop it. If I change the dialog to modal: false, then the problem goes away. Here is my code: <!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xml:lang="en"
  • Sortable portlet with Close (or Menu) option

    I really like the portlet example at... http://jqueryui.com/demos/sortable/#portlets and I have seen the article to "mimic igoogle" at... http://net.tutsplus.com/tutorials/javascript-ajax/inettuts/ and I have read this thread... http://forum.jquery.com/topic/draggable-like-igoogle   Is there a simple way to just add an icon to close the portlet or display a menu?  Although I like all the functionality at inettuts, I'd like to use themeing and I'm not very proficient with javascript.   Can this sample
  • [jQuery] Attribute renaming

    I have tags like this: <select id="academic_from_month-0" > <select id="academic_till_month-0" > since the ids are variable in length, I would have to find out where the lastindex() of "-" is remove that and replace it it with the new value. My problem is the syntax, is there some kind of Jquery way to do this? Thanks
  • [jQuery] cross domain XML with ajax

    Hi! I'm writing an OGC/WMS Viewer using jQuery. One task I need to accomplish involves making a getCapabilities request against a Web Mapping Service, which responds with some XML. I know that the $.ajax function allows me to get JSON from another domain, but is there a way to get XML from another domain? I've tried various permutations of data types, and the $.ajax call with the "jsonp" call gets closest--it returns the XML, but since it's not true JSON, the browser complains. Is my only option
  • Problem with TableSorter

    I am using the tablesorter plugin and am experiencing the following problem: Under several scenarios the up/down arrow icons will overlap with the text in a column's header. This occurs if the browser is resized so the table width is too narrow (e.g. plugin should force a min-width perhaps?).  More importantly, this will also occur when the text in a columns header is shorter than any of the values in the column the up/down icons overlap with the text in the column header.    I've attempted setting
  • [jQuery] [ANN] Downloadable Visual jQuery

    Hi All, At long last, I have put together a downloadable Visual jQuery package. Simply go to <a href="http://www.visualjquery.com">http://www.visualjquery.com</a> and click "Download." By default, the package comes with the most recent HTML, but you can easily add other versions by just saving any of the versioned HTMLs into the same directory. I have also uploaded the docs for 1.1.1.<br clear="all"> -- Yehuda Katz Web Developer | Wycats Designs (ph)  718.877.1325 _______________________________________________
  • jQuery UI as css site theme/framework

    Sorry if this has been proposed or explained before, but what about trying to make the jQuery UI theme the central css "theme" for an entire site.  I understand that there will always be domain specific customization but if the jUI css could provide "hooks" for other elements to use then the ThemeRoller could be a more integral part of creating/updating/maintaining the overall look of a site. My underlying reason for the idea is that I'm a much better programmer than designer and what happens is
  • [jQuery] .reset() methods for forms

    Hello there. As I mentioned in my comment at http://www.learningjquery.com/2007/08/clearing-form-data#comment-9943 I think it would be useful to have a reset method in the core, along the lines of: $.fn.extend({ reset: function() { return this.each(function() { $(this).is('form') && this.reset(); } } }); For a small amount of extra code in the core, people could then reset their forms and carry on the chain ala. $('form').foo().reset().bar(). -- Best wishes, Dave Cardwell http://davecardwell.co.uk/javascript/jquery/
  • jQuery & Google Calendar (Events)

    Hey Folks! I couldn't find any solution or help but maybe you can answer my question. I know there must be a solution somewhere to show my visitors of my webpage a event list from my google calendar. There's "FullCalendar" out, but i don't need a calendar, i only need the events + date. The solution has to work with Google Calendar. Any help or ideas?
  • statuscode and error callbacks

    I just want to query the behaviour of the new 1.5 ajax status codes.  For example, what appears to be happening is that if I declare a handler for a 500 in statusCodes and also set an error handler, my 500 handler is never called, only my error handler is. If I remove the error handler and repeat, my 500 handler is called. This is kind of backwards to what I'd expect, I would expect a specific http status code handler to override the success/error handlers. The success error handlers would only be
  • Fixed footer toolbar and tap events

    Hi, I've set a fixed footer toolbar. It works "ok" (looks really bad) on scrolling listviews, but it is disappearing ALSO with non scrolling tap events. I have a panel with button images, then when I tap on an image, the bar disappears. If I tap again, the same or another image, the toolbar reappears. That's utterly annoying, because it seems like a huge design (application) flaw. The pages are all dynamically inserted into the DOM, and many listviews are NOT so big to demand scroll, but the bar
  • Nested List Theme

    I am using a nested list with the default dark theme. When I click on a list item to drill down into the list, the theme changes to the blue theme. How can I get my list to stay consistent and just have one theme the entire time?
  • [jQuery] TableSorter sorting date column

    Hello, I see that by default the tableSorter plugin can easily sort date+times formatted as: Jan 01, 2000 00:00 AM. But once you take off the time portion it sorts alphaneumerically. How can I get it to still sort properly while just using the date portion (e.g. Jan 01, 2000)? Thanks, Chris. _______________________________________________ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
  • How?: Dropdown menu selection dynamically alters selects of other dropdown menus on same page?

    Hi   I have a project where I need a selection of one dropdown menu may affect the select of multiple other dropdown menus on the same page.   First, a table is generated, and within each row, it contains a dropdown menu. Assume: Rows A, B, C, etc..., and Dropdown selection: 1, 2, & 3   If dropdown in Row A selects 2, then I want the selection of dropdowns in rows B & C to dynamically change to 2.   And if in Row C user selects 3, then the selection in dropdowns in rows A & B should dynamically change
  • Ajax problem: jQuery Mobile with jqplot

    Hi, I've been seeing a problem when using jQuery mobile with jqplot when ajax enabled. I followed the basic instruction for jqplot, i.e., add a div and a simple javascript to make a chart: <div id="chartdiv" style="height:400px;width:300px;"></div> <script type="text/javascript">     $(document).ready(function() {     $.jqplot('chartdiv',  [[[1, 2],[3,5.12],[5,13.1],[7,33.6],[9,85.9],[11,219.9]]]);      }) </script>when I disable the ajax, the chart will show up but if I enable the ajax, the chart
  • jQuery UI and touch devices

    I've been trying to track down information on jQuery UI and touch devices, like iPod Touch & iPad (I have both) and Android devices. This patch: http://dev.jqueryui.com/ticket/4143 is interesting, but incomplete as it only works for iPhones.  Easy fix, but I'd really rather not maintain my own branch.  I'm really not that up on jQuery and don't have the time right now to learn it's internals - even enough to maybe make that patch into a plugin or something. I see many comments, including on the patch
  • Adding an autofill option and anchored filters to the autocomplete plugin

    I propose a couple of new features for the autocomplete plugin. First, add the option to do the text filtering based on the first characters in the source instead of the character string contained in the source. Secondly, add an autoFill option so that the first selection will auto-populate into the input box, with the portion of that option not already typed created as a selection. When the user types in the next character, the selected portion will immediately disappear as part of the keyDown event.
  • autocomplete="off" not working

    hi, I'm currently doing some development on a Blackberry torch. and I'm creating a website with JQM. I'm runing into issues with   Blackberry torch built in autocomplete blocking some of the buttons on my website.    I tired using (autocomplete="off") in the html buts its not working. I would rather not have to ask the user to turn it off in the browser.   Anyone have any ideas?   Thanks  
  • 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