• offsetParent not returning relative positioned ancestor

    In my jQuery plugin, I'm trying to position an element absolutely within the target element's "offset parent."  According to the jQuery documentation, offsetParent is supposed to return the nearest ancestor that is positioned, meaning absolute, fixed, or relative.  However, when calling that function, I'm not getting the expected ancestor.  The target element is located in a position: relative parent, and offsetParent is returning something further up the tree. Is the documentation wrong?  Are there
  • Slow jquery dialog open

    I noticed that jquery-ui is very slow when opening a dialog with some 50 or so links on it. I profiled it using IE 9 profiler, and found that most of the time is spent in the following part of the open function:         // set focus to the first tabbable element in the content area or the first button         // if there are no tabbable elements, set focus on the dialog itself         $(self.element.find(':tabbable').get().concat(             uiDialog.find('.ui-dialog-buttonpane :tabbable').get().concat(
  • multiple jquery script conflict?

    hi guys new to jquery so need some help - i have multiple jquery scripts on my site but there seems to be a conflict and I cant figure out how to solve it. I've had a read on http://docs.jquery.com/Using_jQuery_with_Other_Libraries#Referencing_Magic_-_Shortcuts_for_jQuery and http://stackoverflow.com/questions/528241/how-do-i-run-different-versions-of-jquery-on-the-same-page but not having any luck... could someone tell me where im going wrong? here is my code; [code] <head> <link href="/css/styles.css"
  • jQuery 1.5.1 event.js function: withinElement

    i get a lot of errors (ok only one ;) in the above function, when i look at the code i see // Firefox sometimes assigns relatedTarget a XUL element // which we cannot access the parentNode property of try { when i am in development i want to stop on the try..catch...blocks, but only in my own scripts ;) i found no ticket for this, so now my question:  open a ticket? because problem is known disable error tracking for try..catch is a must? is there an other way for me? :( insert an   if (!parent)
  • iPhone/Apple slows web apps intentionally???

    I just came across this article... A must read for mobile web app devs... http://www.theregister.co.uk/2011/03/15/apple_ios_throttles_web_apps_on_home_screen/
  • Animate using CSS3 instead of JavaScript

    I'm converting a jQuery-based web application for use on mobile and need to make use of the hardware-accelerated performance of CSS3 animations. Ideally I'd like a plugin which overrides some of the basic animation (i.e. fade) functions to make use of CSS3. I've searched around but can't find anyone that has tackled this problem, so I'm considering writing a plugin myself.  Any pointers appreciated. Thanks N
  • Accessing $(this).data('link') in ajax success function inside modal form

    Hi there, How do I get the value of $(this).data('link').id into the success part of my ajax call in a modal form (when validations have been satisfied)? I can retrieve it ok in the form function but I guess the ajax success function can't see it? $('.extern').click(function(event) {   event.preventDefault();   $( "#dialog-form" )     .data('link', this)     .dialog( "open" );                                     }); }); success: function(msg){ // do something like this, var test = $(this).data('link').id;
  • JQuery Lightbox works only SOMETIMES?

    Hey I finished my Hompage and loaded it up on the Internet. I used some JQuery to show divs or hide them. I also used the JQery Lightbox for my Pictures and sometimes it works but not always.  You can see the problem on my Homepage: My Homepage The Picture Gallery is under the link "Fotos" and then klick on (for example): "Frankreich" or "USA". If you click on the Picture, the lighbox should start but sometimes it just opens a new window and shows the picture. Maybe somebody can help me? Thank you
  • 'input:text' selector not finding input element with no type attribute

    As recently as 1.4.3 $('input:text') would find input elements with no type attribute, but after upgrading to 1.5.1 that is no longer the case.  Is this a bug or an intended refactor to be more standards compliant? FYI - this is the selector I now have to use: $('input:text, input:not([type])') Cheers, Jonathan
  • .ajax() Timing Considerations

    I am having some 'timing issues' when using .ajax() in asynchronous mode.  Basically I have two functions: retrieve_data(); work_on_data(); They are called in this order. retrieve_data() performs an .ajax() call, and the return data is used to populate a data-structure as a function passed in to the .ajax().success callback method. The obvious problem is that work_on_data() is being called before the data-structure is being populated, so nothing is built correctly and displayed on the page. A 'hack'
  • runat="server"

    Hi, I was wondering why when using the UI slider that it doesn't work whenever I make the input box runat="server". Works:     <input type="text" id="amount" style="border:0; color:#f6931f; font-weight:bold;"  />     <div  id="slider1"> Doesn't work:     <input type="text" id="amount" style="border:0; color:#f6931f; font-weight:bold;" runat="server"  />     <div  id="slider1"> Thanks for the help...
  • scrolling page based on focus of elements?

    I am creating a plugin that gives keyboard navigation to tabular table across multiple tables. When I have rows that run off screen I would like to scroll the window down.. and the reverse is true, when navigating up.   Logically I need to get the position of the element that has focus and specify how much to scroll the window.  Any help in this direction would be great!!   Thanks!
  • Themeroller - Cannot edit existing themes on the jQuery Website

    Yesterday, I was using Themeroller to create my own variation of UI lightness. I go here: http://jqueryui.com/themeroller/ Click 'Gallery.' Click 'Edit.' 'UI Lightness' shows up in the 'Roll Your Own' section. Yesterday, all of the colors, attributes, etc. would appear in the menu, and I could edit them. Now, the colors show on the Themeroller screen, but when any edits take place (e.g. Font Settings: 1.7em from 1.1em), it reverts to an all-grey theme. I have cleared my cache, restarted my computer,
  • tablesort

    i'm using  http://tablesorter.com/docs/ and it works well... except for number values with commas in them. i've looked into the parsing feature but can't seem to get it to work? i need to include commas in the numbers in the table cells. has anyone else experienced this and created a work-around?
  • the edit link on Gallery does not allow me to edit the existing theme

    Hey all, I go to http://jqueryui.com/themeroller/ And I select gallery Then I choose "edit" for the Redmond theme to customize theme But all it does is update the theme to reflect Redmond But if I want to just change one color like the background color for header, there is no option here to do that. I have to go to Roll Your Own theme and that sets the theme back to gray not the Redmond. So then where can I customize an existing theme? Clicking on edit icon to customize theme does not allow me to
  • .hover() problem (slider)

    Hi, I've created a slider But I've a last little problem. So it would be nice if someone can help me here :) 1. Download the file above named "theslider.zip" 2. Open the slider.html in any browser   Follow these steps to understand my problem: 1. Hover with your mouse over "Tab 1" --> now the "divbox" expand and the "underbox" slide down   At the moment it does the following: The underbox collaps if I leave the area of Tab 1. So if I hover from Tab 1 to the opened underbox the Tab collaps..............thats
  • Cannot call method after changing page

    Hello everyone ! I change page A to B, B to C, C to A with a standard href, when I come back to the page A at the end, I cannot call any methods declared in this page. This issue doesn't appear if I set 'rel='external' ' however, this disable animation and I need to keep it... Any idea? Thank you for your help Phil.
  • Error Loading Page...

    I would like to book style application. User will add 'data-role="page' divisions. My script will make a Table of Contents and navigation button. I made index.html as follows and book.js is as follows. book.js will add ID='Pxx' attribute to each page and set next id into each button attribute from the last page. But I run and push button, it shows 'Error Loading Page'. You can reproduce this issue by just these two files.  I'm afraid, I make something big misunderstanding about JQM. Can anyone give
  • jQuery UI tabs - How to cahce only specific tabs?

    is it possible to cache only specific tabs in a jquery tab widget? for example i have a tab: $(function() {              $("#tabtab").tabs({    spinner: "",    cache: true,     ajaxOptions: {       async: false,             error: function( xhr, status, index, anchor ) {                 $( anchor.hash ).html(                     "foo" );             }         }  }); unsorted list has 10 <li> is it possible to cache <li> 0/1/2, but not to cache 3 to 9? i have no idea how to do this
  • [solved] How to autoclose a jquery ui dialog with timeout?

    hello, i am very new to jquery. there is one thing i can not get working. how can i autocloe a dialog? $(document).ready(function() {     var $dialog2 = $('<div></div>')         .html('Wollen Sie sich abmelden?')         .dialog({           autoOpen: false,           title: 'Abmelden',             resizable: true,             show: 'fade',             hide: 'explode',             height:140,             modal: true,             buttons: {                 "Abmelden": function() {                    
  • In alpha 3 when we get dynamically data for selectmenu...for the first click selectmenu is not working

    iam getting data from json for the select menu...for the first click its  not opening..when i click back button and move again to same page and click select menu,then,its working....can any one suggest me?
  • Size() and Children() returning different results

    Hi, I have the code:              console.log($(this).parent().parent().children());              console.log($(this).parent().parent().size()); And the output is:       jQuery(td.center, td.center, td.center, td.center, td.center, td, td)       1      Why is the size() 1 and not 7? I can't quite figure it out. Many thanks! Chris
  • Is there any event before the changePage method call?

    I need create my data-role='page' element dynamically before the changePage method called. JQM has bind both $('a[href]').click and the 'hashchange' events. And I bind my create method to these two events too. the 'click' event works now but 'hashchange' invoked after JQM's. What can I do? or should JQM trigger a 'beforePageChange' event in the changePage method?
  • Start new div on <hr/>

    Problem: I have a piece of HTML-content, with <hr/> as section breaks. I want to replace the <hr/> with a new <div>.   Thus, original: <div>Test test test<hr/>Test test test</div> Result: <div>Test test test </div<div>Test test test</div>   With $('hr').replaceWith('</div><div>') it does not work, because the replacement is not valid HTML. I want to create columns, with <hr/> the column-divider. Perhaps there is also a better solution. The editor is creating the content and inserting HR's where a
  • What are the comparator operators === and !==

    I have never come across any javascript book that mentions the comparison operators === and !==.  Are these defined in jquery itself ?  If not, what's the deal? Thanks. jtt 
  • how to multi languege

        function validateEmail(){         //testing regular expression         var a = $("#email").val();         var filter = /^[a-zA-Z0-9]+[a-zA-Z0-9_.-]+[a-zA-Z0-9_-]+@[a-zA-Z0-9]+[a-zA-Z0-9.-]+[a-zA-Z0-9]+.[a-z]{2,4}$/;         //if it's valid email         if(filter.test(a)){             email.removeClass("error");             emailInfo.text("Valid E-mail please");             emailInfo.removeClass("error");             return true;         }         //if it's NOT valid         else{            
  • Best way to update selectedIndex variables?

    http://jsbin.com/obuko4/edit This is my sample code so far. Currently it only works for "Akali" under the "Select a champion..." dropdown list. The way it works is, you select a level from 1-10 from the "Select a level..." dropdown list, and then you select Akali from the other dropdown list and her "Health" is calculated by "lvl * 80 + 510" which works perfectly. But the problem is if you change the level that value does not update automaticly. Instead the person using it has change the level to
  • expandable menu jquery not working on IE works fine in other

    need help to modify this code to make it work in IE . other browsers works fine.   <script src="js/jquery-1.5.1.min.js" type="text/javascript" charset="utf-8"></script> <script type="text/javascript"> $(document).ready(function() { $("#view_products").click(function () { $("#nav_products").slideToggle("fast"); $(this).toggleClass("active"); }); }); </script> I even dowloaded the latest library but still no luck. thanks
  • HELP with ajax method - callback function not executed

    hello all!       i am trying to retrieve json data from the world bank's API, here's my code: <html> <head> <script src="http://code.jquery.com/jquery-latest.js"></script> <script type="text/javascript"> var theData; $(document).ready(function(){   $("button").click(function(){   $.ajax({ url: 'http://api.worldbank.org/sources?format=json',               success: function(data) {                   /*this alert message does not show*/                   alert(data);              },               dataType:
  • jQuery and Lynda.com

    I am working on a website and I would really like to figure out how to do it like Lynda.com.  If you ever check that out, it's an outstanding way to do the navigation on authors and classes.  I know is jQuery and I looked at the source code.   I am a beginner at jQuery and need some help.  I am doing on courses on Lynda.com for jQuery which makes sense, but i see in the code, they are using ajax.   Is there a plug in already designed for this that works with mySQL?   Some advise would be helpful.
  • Use tmpl and load data from json

    Hello, When I use this code (page = #spectacle) : $('#spectacle').live('pagebeforecreate',function(event, ui){     var movies = [{title: "The Red Violin", proch_date: "1998"}];         $("#movieTemplate").tmpl(movies).appendTo("#test"); }); That's work fine. There isn't problem to load page with Jquerymobile style. But, when I try to load my data from json like that : $('#spectacle').live('pagebeforecreate',function(event, ui){     $.getJSON(url_thnet, function(datas){             $("#movieTemplate").tmpl(datas).appendTo("#test");
  • Radion buttons won't style properly on second load

    Hi, I'm having a very weird problem with radio buttons in JQuery Mobile. I'm populating some radiobuttons with ajax. When I do it the first time it's ok, but any subsequent loads seem to cause problems with the display - each checkbox is displayed separately rather than on a single list. It knows that the buttons are in one group, because selecting one causes the other to deselect. But the styling suggests each is separate. function getWords() { var gig_id = $('#gigs').val(); $.ajax({ url: Nnn.serverLocation+'/words?gigid='+
  • Simple jquery tree structure menu: Review

    Hi Everyone! I have done a recent tree structure menu in jquery and i would like to know your suggestions on the same. Critical reviews are always welcomed. Do tell me how can i improve the code. Here is the link. http://mediamilan.com/how-to-create-simple-tree-structure-menu-using-jquery-and-css/
  • Sortable in Sortable?

    Heyho, I'm trying to create a sortable container into another one, basicly it works well. But when i start to drag Elements from the inner sortable to the outer one it starts to flicker. http://jsfiddle.net/x34WN/ The background of this is: I want to create "Portlets" on the site that are sortable, but the content of the Portlets should be also sortable. If someone got an Idea, im open for anything :> Thanks in advance.
  • Trouble with jQuery and AVG Safe Search plugin for Firefox

    Hi guys, I've some problems with rendering my own web pages using jQuery and jQueryUI (all recent versions) on Firefox (with AVG plugin installed). Googling for problem solutions I've found some blogs that advise to disable the AVG plugin. But, obviously, I can't ask my users to disable a plugin to see my website! But... surfing on jquery.com or jqueryui.com everything works fine. There isn't, in any case, any rendering problem. How can it be possible? Could someone help me, please? Matteo
  • SuperFish menu problem - when the page loads, displaying the submenu items.

    Hi, when my page is loading, superfish submenu items are visible... when page is completly loaded, than everythink is ok. my website: http://www.podkycmolem.cz (It's happening, when u have slow connection, probably..) See attachments. It's there some way to fix it?
  • UMTS-Sticks can break jQuery

    It is not a problem or bug of jQuery but I wanted to share an experience I just made. A customer reported us that he can't use one specific part of a web application we provide. We could not reproduce it and for us and other thousands of customers there was no problem. So we decided to have a desktop sharing meeting. In response of my questions he said that this problem encountered two weeks ago and that he has problems with other websites too. I saw that there is a syntax error in the jQuery library.
  • How to select a list Item then add it to a Form Value

    Hello I need some advice please. I have got a basic Unordered list of Options and I want to be able to click on one of the options and have that option added as a value  to a Form Value Input on my submit form. Users will have a choice of around 200 options and I need them to just add one of them with a click to the submit form. I do not want to use a 'select' box to list the options,it has to be a visiable unordered list. Please help me. Thanks Gezzie
  • Add animation step callback to jQuery UI effects?

    Hi! Would it be reasonable to add a per-animation-step callback to jQuery UI effects? So that when you e.g. hide() something,   http://jqueryui.com/demos/hide/ then, on each hide animation step, the per-animation-step callback is invoked. Background: I want to redraw SVG arrows on each animation step, when e.g. something is slided/folded in/out. I've done this for the Resizable interaction (there's a resize event, triggered on each resize step). But for jQuery UI effects, there are no per-animation-step
  • Simple form on jquery mobile

    I am a new user of jquery mobile and Im having issues with submitting a simple "get" request using a form. Following code displays "Error Loading Page" on Mozilla or Safari (haven't tried on a mobile device yet): <!DOCTYPE html> <html>     <head>     <title>Test Form</title>         <link rel="stylesheet" href="http://code.jquery.com/mobile/1.0a3/jquery.mobile-1.0a3.min.css" />         <script src="http://code.jquery.com/jquery-1.5.min.js"></script>         <script src="http://code.jquery.com/mobile/1.0a3/jquery.mobile-1.0a3.min.js"></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