• what does apply() mean

    I ran into this code and cannot find a reference in the jquery API $li.click(function(e) {                 setCurr(this); return o.click.apply(this, [e, this]);             }); What does apply() mean? Thank you
  • linking a textfield with buttons in a div

    hi all, i have created a form which is like this. <form name="form" action="servlet" method="get" > password <input type=text /> <a href="" id=measurement > advs setting </a>  <br> <input type=submit value=submit /> </form> <div id=SetLoc > <table>     <tr>           <td>                 <input class="keys" type=button value=M />           </td>                 <td> <input class="keys" type=button value=D />           </td>                 <td> <input class="keys" type=button value=F />          
  • [jQuery] use jquery script from parent of iframe

    Quick question. There is a parent page that uses jquery and iframe in that page, which loads a page that also uses jquery. I would like the child parent to use the parent's instance of jquery. i tried: <script type="text/javascript">var jQuery, $; $ = window.parent.$; jQuery = window.parent.jQuery; </script> which actually loads without error, and even allows some of the childs jquery functions to work, but others don't or work poorly (throw errors). is there another/better way to do this? everything
  • Disable() Enable() for anchor tags

    I have designed a toolbar that uses anchor tags (<a>) with click events assocated with each one. I want to build a JQuery plug-in that allows me to easily enable and disable certain anchor tags in my toolbar with syntax similar to this...   $("#aDelete").linkbutton("disable");   These things would have to happen in the "disable" event:   1) The CSS class would have to change to a "disabled" class to change the look of the button. 2) The current event stack (especially the "click" event) would have
  • Need help to get .draggable(); working.

    Hi guys, I need help using this sliding background image script http://www.buildinternet.com/project/supersized/ together with the jQuery ui or plugin drag function. Anything that is able to make the draggable(); function work. I like to place an absolute div that is draggable across the sliding background. The function only works when I remove the .js links needed for the sliding background to work. But as u can guess the slider stops working. Here's the link of the script for download. http://www.virginiasapartments.nl/supersized3.zip
  • jquery with CHtmlView of MFC

    i planned to use jquery to my MFC application with CHtmlView. i found that CHtmlView::OnDocumentComplete was called after jquery's $(document).ready(). how can i call C++ function before call jscript $(document).ready() function?
  • Window Unload overwritten

    I am trying to add jQuery to a very large project that has many parts owned by teams outside of my own.   I noticed that several of our pages have inline (or asyncrous script which could occur before/after jQuery)for the window.onbeforeunload event.   When jQuery evaluates after our inline script (or async scripts) it seems to blow away the previous window.onbeforeunload method.     beforeunload: {    setup: function( data, namespaces, eventHandle ) {     // We only want to do this special case on
  • Slider jumping to 100% position

    I have a slider, min=0, max=325, starts with a value of 0 so all pretty standard. I am using a timer to update the slider value once a second with a value I get from the back end server. The value is simply increasing so 1,2,3 etc so the slider moves along as the value increases. This all works fine until I set the value to 4 and then the slider jumps to the end. Inspecting the div shows a style of width: 100%. When I added some code to display the min,max and current values from the slider after
  • jquery template plugin - how to access item index for ?

    When passing array data to tmpl(), the template plugin will apply the template to each item in the array. However, I cannot find a way to get at the current item's index, eg as ${$index} Nor can I find a way to use {{each}} on a top-level item. My workaround has been to embed my array data in an object, just so I can use {{each}}, just so I can get at the index, but that seems needlessly convoluted. Am I missing something? I would prefer a consistent design, where {{each}} was used for iteration
  • added upload control isnt sent by request.

    Hello , I am having an iframe inside a page , in the iframe i am having an image and on that image am adding a new upload file , but the problem is that the file chosen from the browse button isnt being sent with the form , this is the animation function n this is my code (function ($) {     var defaults = {         rowSpeed: 1000,         newRow: null,         addTop: true,         removeTop: true     };     var newClasses = "newRow"     var options = $.extend(defaults, options);     $.fn.addRow
  • Convert, strip or encode html characters (<,>,", etc.) to put in a form.

    Hi, I'm creating a page where the user can place images in a <div> by using the drag & drop and resizable plugins. Everything works fine, but I'd like to save the generated css (position, size, etc) in a form to post it in another page.  The only solution I see is to clone the div in a textarea or an hidden input, but I don't know how to change the html characters (<,>,", etc.).  Can someone save me please ?
  • Strange problem when using validation plugin

    Hi,   I'm using validator plugin (jquery.validate.min.js) to validate form fields.   my form is built like this: Copy code <form action="<?php echo $base_url;?>create" method="post"> <div id="formstyle_editeven"> <ul> <li class="first">Name:</li> <li class="required"><img src="<?php echo $base_url;?>assets/css/images/asterik.gif" /></li> <li><input name="name" type="text" class="mform" value="<?php echo set_value('name');?>"/></li> </ul> </div></form> (this is a shortened version, but u get the idea).
  • Tabs: Adding new tab, and selecting it. how to stop the reloading of the tab when i select it

    i have a page that is using tabs. I have links that create new tabs, and then select the newly created tab. This is all working correctly. But: each time i change tabs, and go back to the newly created tab, it keeps "reloading" the page/information. How can i stop this? I just want to show the tab without the reloading. my tabs initiation is: var $tabs = $('#tabs').tabs({ add: function(event, ui) { $tabs.tabs('select', '#' + ui.panel.id); } }); And my code to add a new tab is: $('#tabs').tabs("add",
  • ui css framework and datepicker.

    hi. I have a problem that i want to remove the background image of  the ".datepicker table td a" selector but doen't work. tried a lot of selectors and Nada. thanks .
  • jQuery 1.4.4 selector problem in IE8

    Hi,   I have 18 check boxes (all checked) on a page, with one of them disabled, based data bound values.  I have a few examples of IE8 not responding like FF, with FF giving the desired results. $('input[onclick="chkClick();"]:not(:disabled)').size() works in FF, but not in IE8.  FF returns 17 check boxes, IE8 returns 0. $('input:checkbox(:disabled)').size() returns 18 in IE8, when only one is disabled.  FF returns 1, as it should. $('input[onclick="chkClick();"]:checked').size() returns 17 in FF
  • Problem with hover

    Hi again, I have a problem with hover and click, My intention is that if the mouse is over a header, then the header should be underlined and bold, and if the header is clicked, the header should stay underlined and bold, but only the clicked header, if another header is clicked than the other headers should be not underlined and bold but the clicked header should be underlined and bold. Does anyone know how I can do this? Thanks a lot, All the best, <div id="latestNews">                 <div id="latestNewsHeader">Letzte
  • Calling jquery functions other then on document ready

    I am missing some probably trivial understanding regarding when jquery code can be called, and would like some pointers please. the particular example happens to be for a slideshow, but could be any other jquery functionality. So I have this situation where the normal call is on ready like this <script type="text/javascript"> function onBefore() {     $('#output').html("Scrolling image:<br>" + this.src); } function onAfter() {     $('#output').html("Scroll complete for:<br>" + this.src)         .append('<h3>'
  • Pagination plugin creation, .data trouble

    Hello,  I m doing my first plug-in with jQuery, I'm building a pagination one. I want it to be used for more than one pagination on the same page (maybe not useful for a pagination, but I need to learn how to use a plug-in on several item in a page with different params for each items.) I want to ad as a param the area to update, that's work, but I can't lets those data to be available at any time. I'm trying to link those with .data() on the pagination div. When I do the first click, it work, the
  • Alternate hide and show

    Hi...   I am looking at Karl Swedberg's tutorial for hiding and showing items, a very good tutorial indeed!   http://www.learningjquery.com/2006/09/slicker-show-and-hide   I took the exsisting JS, copied, pasted and edited it so that I get 2 boxes working on my page.   As follows: $(document).ready(function() { // hides the slickbox as soon as the DOM is ready (a little sooner that page load) $('#slickbox').hide(); // hides the slickbox as soon as the DOM is ready (a little sooner that page load)
  • Form Observer help

    I found this code on google.  I want to  watch a form for changes.  If changes are made and user navigates away from the form, I want to popup a warning.  If user clicks submit I want to process the form as usual.  Currently the former is working find, but I also get a warning on submit.  Here is a demo site...   https://q3ait.org/js/testobserver.html Here is the js code... /**  *  jquery.popupt  *  (c) 2008 Semooh (http://semooh.jp/)  *  *  Dual licensed under the MIT (MIT-LICENSE.txt)  *  and GPL
  • Quicksand and a lightbox(the lightbox wont load the images afther using quicksand)

    I am working with the plugin called quicksand, all things work but when ik use the quicksand the ligthbox works but only the images wont load(in the beginning the images will load) Tha basic plugin code below, as you can see theres and enhancement part which reloads all other jquery stuff used on the section.       $('.sort-by-cat').quicksand($filteredData, {         duration: 500,         easing: 'easeInOutQuad',         useScaling: true,         adjustHeight: false,         enhancement: function()
  • If statement + mouseleave How to?

    Hi, how i can make work this code, please? I'm new of JQuery scripting and nobody can help me with this code: //---------------------------------------------------------------------------------------------- // <!--Menu 1 --> $(document).ready(function() { $("#ldheMasterHotSpotMenu1").delay(50000).mouseenter(function(){ //     $("#ldheMasterHotSpotMenu1").mouseenter(function(){      $("#ldheMasterPictureSelettore").animate({opacity: "0.5", width: "30", left: "3"}, 200);      $("#ldheMasterPictureSelettore").animate({opacity:
  • Custom Regex pattern

    My question is how do a custom Regex. This one below works ok, it stops "every" special characters. regex:"^[a-öA-Ö'.\s]{1,40}$", But supposte I do want to allow some of the special characters, in my case I want to allow - and space. Is there some application maybe on the internet to just put in exactly every charachters you want to dissallow, like building a custom regex pattern? Any guides would be great here, I don´t know about construction of regex patterns. / Cheers  
  • Instantiating and running jPlayer directly one after the other doesn't work -- why?

    Hi everybody, I want to initialize the jPlayer plugin and directly play an audio file one after the other, however it somehow doesn't work. I've found a workaround, that if I wait aout 750ms (setTimeout) then playing the audio file works. Example code of what doesn't work: // initialization var jp = $('<div id="jplayer"></div>'); $('body').append(jp); jp.jPlayer( { swfPath: "javascript" });         jp.jPlayer('setFile', 'somefile.mp3').jPlayer('play');That code would be called after a user clicks
  • jQuery Dropdown with Auto Suggest

    I have a form, with a dozen or so drop down fields, each of which has a list associated with it. A few of the lists are quite long (~3000 items). I have attempted using the combobox with autocomplete:   http://jqueryui.com/demos/autocomplete/#combobox   But it was quite slow with the longer lists. When I implemented it page wide, it was so slow as to be unusable.   Does anyone have any experiencing using jQuery combo boxes with autocomplete and long lists?   Thanks,   Matt
  • Pageshow when not gradeA

    This might have been answered already but I wasn't able to find the answer. Is the pageshow event supported when the device is not gradeA? If not, is there some sort of fallback that one could use instead of using pageshow for devices that is not gradeA. The reason I'm asking this is because I have a bunch of getJSON's under pageshow so I really need that functionality to be present even if it's not gradeA. Thanks!
  • hoverIntent/delay problem

    Hi, I am new and tried posting the other day but it did not go through. So I'm trying again. I am new to jQuery. Past experience was in AS3. I'm rebuilding a website but find some of my menus a little jumpy. I found the hoverIntent UI but could get it to work. I'm using another version. Im getting the right delay at first but I canot get he menu(#list") to toggle back up in any reasonable way. It just fades out. Could someone check my code and point me in a good direction:  $(function(){        
  • $.ajax POST and Http headers

    Hi all, i want to call a web service from jQuery AJAX method, it is working perfectlly, but i have a big request, look at the example i attached. It is 1,567 bytes length. i only need to pass 2 bytes and i receive gzip data (around 300 bytes) i want to reduce as much as possible HTTP overhead by removing (at least) Referer and User-Agent. i tried with beforeSend but it is not working. any idea on how to do the trick? Thank you POST http://www.site.com/XXX.asmx/GetThis HTTP/1.1 x-requested-with: XMLHttpRequest
  • AJAX get problem with varible

    Hello, I would like to ask you how to get the value of variable "data". This not working:  ...        else if (field == 'username')     {         $.get("register.php", {check: content1},         function(data)         {            if (data == 'ok') {ok = 1;} else {ok = 2;}         });     }   ...And this working, but I don't want any alert.   ...     else if (field == 'username')     {         $.get("register.php", {check: content1},         function(data)         {            if (data == 'ok') {ok
  • Select box needs option to not open long lists in new page

    So I've been complaining a lot about select boxes lately because it's in my opinion one of the most needed yet ironically buggiest widget in jQM. Here are my current complaints: http://forum.jquery.com/topic/global-select-box-display-bug I just ran into another situation where I was loosing my current page's "state" and then I realized it's because the select box opens long lists in its own on the fly created page. I knew this before but the connection wasn't being made until just now when I realized
  • How to react on connection refused errors on AJAX requests?

    Hallo, how can one react on connection refused errors when doing an ajax request with $.ajax()? I installed an error handler which should retry (after a certain timeout) to connect to a backend server by calling $.ajax(this);, but this error handler only works if there was any HTTP error, but not on "deeper" network errors like connection refused if the server went offline in meantime. I'm looking for a way to retry to connect to the server e.g. each second until the connection is established again.
  • Separating HTML in Ajax request?

    I'm using ajax like this (from the docs): $.ajax({ url: 'ajax/test.php', success: function(data) { // do something with data } }); The test.php prints a lot of HTML <div id="content1"><div id="test">test</div> testing more</div> <div id="content2">testing more</div> <div id="content3">testing more</div> What I want to do is to fetch different parts of the HTML (in this example #content1, #content2, #content3) so I can update different parts of the page with the contents of these divs. I cannot seem
  • jQuery won't bind events to <object> elements

    It looks like when I do $("object").bind("<mouse-event>") the event isn't actually being bound to the element in Chrome and Firefox (not sure about IE).  Using $("object").each(function() {this.addEventListener(...)}) works fine though. I may have done something wrong (sorry if so). Here's an example page (it won't let me upload a .html for some reason).  The commented out portion works, the uncommented part doesn't. <html>     <head>         <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.js"></script>
  • How To Let A Message Disappear After x Seconds?

    Hello, Does anybody know how to let a message disappear after x seconds? It does work, but disappears almost immediately and then trows an error :( This is what I have for now: $(document).ready(function() {      $('button').click(function() {     var message = 'Feedbackmessage';     feedbackMessage(message);   });        function feedbackMessage(message) {     self = $('#feedbackMessage');     self.empty().append(message);     setTimeout(self.fadeOut(), 3000);   } }); Live example -> http://jsbin.com/omubo4
  • jquery-tmpl not working with href links

    Having trouble getting jquery-tmpl to create dynamic href links. The name shows up correctly but I can't seem to get data inserted into template placeholders inside href tags. HTML <ul class="list1"> <li class="leftnavlink"><a href="/categories/${id}">${name}</a></li> </ul> JavaScript jQuery('ul.list1:first li:first').tmpl(categoriesData).appendTo('ul.list1'); JSON var categoriesData = [{"id":"20","name":"Aero Parts & Exterior","product_count":"0"},      {"id":"33","name":"Front End","product_count":"0"},
  • Issue with the jQuery pagination

    I'm working on a page that has pagination and 3 different types of sorting. When the page is loaded, the pagination works fine, but, when i go to page 2 and then i choose one ordenation, the page 2 remains as index.     The itens of page are inside of lists and divs tags.   here's the code:   <script>       var quantItens;       var hide;       var paginated;        function pageselectCallback(page_index, jq){     var order = document.getElementById('order').value;     var new_content = jQuery('#Searchresult
  • I have some questions with <<Auto-generated pages and sub-hash urls>>

    In the http://jquerymobile.com/demos/1.0a2/#docs/pages/docs-navmodel.html , I read the document below. Auto-generated pages and sub-hash urls Some plugins may choose to dynamically break a page's content into separate navigable pages, which can then be reached via deep links. One example of this would be the Listview plugin, which will break a nested UL (or OL) into separate pages, which are each given an ID so they can be linked to like any normal "page" in jQuery Mobile. However, in order to link
  • Using livequery to load external javascript into a div layer

    Forgive me, I'm not a UI developer at all. I have a messy site with lots of JS/jquery, that loads the primary content for the home page from "index-ok.html" using load(): $('#main').load('index-ok.html); Inside index-ok.html is a div element with an id of "ad", ie: <div id="ad"></div>I need to display some javascript inside of the 'ad' div, that will display some google adsense ads - just inserting the google adsense js code inside of index-ok.html absolutely does not work, so I'm trying to load
  • Navbar style buttons in list-divider

    I would like to use the navbar or ui-grid style buttons (evenly spaced horizontally) in a list-divider element to act as a filter for the list contents. This style is what I'm looking for: <div data-role="navbar">   <ul>     <li><a href="?asc">ascending</a></li>     <li><a href="?desc">descneding</a></li>     <% end %>   </ul> </div> This style also would work: <fieldset class="ui-grid-a">   <div class="ui-block-a"><button type="submit" data-theme="c">ascending</button></div>   <div class="ui-block-b"><button
  • accordion in IE9

    I am sorry if this post is a duplicate to a reply I posted earlier, but it appeared that that thread may not have been active. I am using UI 1.8.6 and  jQ 1.4.4 and the latest IE9 beta (v7.930) I encounter the standard "IE-is-breaking" error when trying to open an accordion element other then the first one. To wit, the error is:  'null' is null or not an object  jquery-ui-1.8.4.custom.min.js, line 287 Does accordion remain a problem for others in IE9? Specifically, on selecting the first accordion
  • 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