• How to attach resize event to top window from iframe?

    Hi Guys, I would like to attach resize event to top window(main.html) when iframe(sub.html) ready.but seems it doesn't work,please see below code : i dont know why it does not work,please,who could correct me ? or give me some suggestion on it? i will appreciate it. $(window.top.document).ready(function(){       $(window.top).resize(function(){         alert("grt!");     })     });
  • Simple tab, why is this not working??

    Can someone please help me out.  Please look at the line under $(.tabs).click  it does not work like that, but it does work fine if I replace $("#pane .tabpane .selected") with just $(".selected").   Any help would be appreciated.  Thanks! <html> <script src="../js/jquery-1.4.2.min.js"></script> <style> .selected{             //display:block;       } </style> <script> $(document).ready(function(){ $('.tabs').click(function(){ $("#pane .tabpane .selected").hide(); $("#pane .tabpane .selected").removeClass('selected');
  • JQM Alpha 4, AJAX naviagation with URL rewrites from an MVC not working?

    I am using jquery mobile with Coldfusion and the Coldfusion framework Coldbox 3, in  JQM alpha 3 all links worked as expected (Ajax style) with the loading dialog and page transitions. Now with the new A4 all links are now just normal links that load normally. While my application still works, its missing the AJAX navigation? Here is an example of what a link looks like in Coldbox... <a href="http://www.example.com/MobileApp/index.cfm/Cruise/Index/?id=1&offer_id=243"> and another <a href="http://www.example.com/MobileApp/index.cfm/Cruise/Reviews/?id=1&offer_id=243">
  • jquery dropdown menu for textfield and values passed?

    I found there are many answers that jquery developer tend to use jquery autocomplete plugin to obtain the DROPDOWN style on the textfield.  That was nice if the Server give a responds of 1 type of values. (for example; only a Brand name type, or anything that only 1 type, in which the occurance may appeared more than once). But how about when the returned (responded) values from the server is many types. And they also occured many times. I prefer to extract these values for these destination; 1)
  • Checkbox Arrays and Collapsible Lists

    Can somebody explain why this HTML doesn't work for jquery mobile alpha 4? Aren't checkbox arrays supported? How do I make it work? <div data-role="collapsible-set">     <div data-role="collapsible">         <h3>Vegetables</h3>         <div data-role="fieldcontain">             <fieldset data-role="controlgroup">                 <input type="checkbox" name="chk0[24]" id="chk0[24]" class="custom" />                 <label for="chk0[24]">Carrots</label>                                 <input type="checkbox"
  • Styles are not applying on <li> elements when loading more <li> in a <ul> element.

    So, I am trying to load more <li> elements in a <ul> element on clicking a button. The markup is something like this. <ul data-role="listview">   <li data-inline="true">     <a href="#" rel="external">       <span class="imgContainer">         <img src="#" width="160"/>       </span>       <p>         <span class="title"><strong>#</strong></span>         <span class="from">#</span>, <span class="views"># views</span>       </p>       </a>   </li> </ul> <span data-role="button">Load More</span> I
  • autocomplete with a textfield and its id

    Hello guys!  Actually I have this html interface;  <input type="text" size="20" name="brandname" /> <input type="hidden" name="brandid" value="" /> And this is my jquery;  $('#brandname').autocomplete("searchbrandnames.jsp", {                 minChars: 3             }); OK... the ideas here is that; Once the user type something into that textfield, the jquery will work to have a somekind of autocomplete... like what google does for example. But here, if we notice from the interface above, There is
  • .animate({}) doesnt work with zIndex?

    Animate doesnt seem to work with zindex. I dont see anywhere this is mentioned on the animate() page. $("#myelement").animate({zIndex: 10}) .animate({opacity: 1), 1000); Opacity is affected but not zIndex. I can change zIndex the normal way though: $("#myelement").css('zIndex', '10');
  • jQuery ajax xml help

    Hi, I need a way that a xml file needs to retrived from the server in synchronous way  $(document).ready(function(){ var x=$.ajax({       type: "GET",       url: "status.xml",       cache: false,       async: false,       dataType: "xml",       complete: function() {             $(this).addClass("done");                                     }  });             if(x.done) {                                // process the xml                            } }); I´ve set it to async: false so why it does not
  • Modal window: resizable abnormally works on bottom left but not on bottom right corner

    Version: 1.8.10 My jQuery modal window works properly (thanks to you guys for such a beautiful job). I have one issue though and that is: I want to resize the modal window but it does not let me do it from bottom right corner of window, instead the resizing works on bottom left corner of window, also the image to represent resizing is missing. Why does this happen and how to fix it?
  • jQuery checkbox, getting status of checkbox

    Hi there, I'm having some trouble with determining the status of a checkbox after it has been clicked with the jquery.checkbox plugin http://widowmaker.kiev.ua/checkbox/ Here's my test case http://dev2.savingforchildren.co.uk/mjs/checkbox.epl When you tick on the 'fancy' checkbox, the javascript attempts to get the status with  alert(this.checked); - but as you can see it gets it precisely wrong, presumably because it is getting the status of the checkbox before it has actually been changed. Can
  • Using actions in href like this "href='lang.php?addlanguaje'"

    I have this..     <li><a href="<?php bloginfo('url)/lang.php?action=chglang" >Castellano</a></li>  my lang.php is: <?php $action = $_GET['action']; if($action == "chglang"){ //Do something } ?> When I click to href i get a etern loading message and I get this javascript error "j.data("page") is undefined". My lang.php works fine but I get this etern loading message and I don't know why... Thanks in advance.
  • How to stop iPhone confirmation on long button press?

    If i click on a link button for a second or two, the iPhone will show a notification window asking if i want to open or cancel the press. The nature of the link is shown at the top of the window, i.e. "Javascript" or the path to the local file I may make all my links trigger through Javacript so a user does not see the file path. Would be nice to stop this appearing but guess it's unavoidable Has anyone found a work around?
  • possibility to override native selector in sizzle

    Currently sizzle is always using querySelectorAll or *matchesSelector, if a browser supports this + the used selector and there is no way to override this behavior. My problem with this, is that there are some pseudo selectors, which are buggy in native implementations. For example the :invalid selector is buggy in safari 5 (chrome 10 works perfect) and are partial in FF4. Currently my workaround is to implement a non-standard pseudo-element -> :invalid-element. But this also means, that chrome 10
  • How to add slide effect when switching images with external trigger?

    Hi, I'm really new at jquery and am trying to achieve a relatively simple effect but having a hard time.  I have the code to swap the images displayed in a particular div with an external trigger but want to add a slide effect to the new images that loads upon activating the trigger.  The code I have so far is: <script type="text/javascript"> function changeBelt(beltName,BeltHolder) { var obj = document.getElementById(BeltHolder); var imgBelt = "<img class='belt' src='"+beltName+"' border='0' />";
  • jQuery SVG animate(move) group according to initial coordinate system

    Hi everyone! I have a problem with moving group element. I want to move it according to initial coordinate system of parent svg container. But transform:translate(10,20) for example, establishes a new user coordinate system which origin (0,0) is absolute X=10, absolute Y=20. How can I animate(move) group with absolute coordinates without writing additional functions to calculate this coordinates?
  • Trouble linking to mp4 file please help

    I am trying to play an mp4 file "myoplex.mp4" from a href link and I just get a waiting Ajax icon. I am able to play the video when I use a video tag to play it however that means that it brings it to a separate page. I want it to auto play the video and return to the page when completed. I would think this would be extremely easy. Something it seems in jquery mobile is restricting this. Can someone pleas assist me or tell me why I am such a moron I guess. It seems like such a simple fix and yet
  • Memory Game, hover card

    Hi, I'm currently trying to code a jQuery base memory game for school. I however got one problem right now. The cards are supposed to change picture on mouseover and change back on mouse leave. However, if you click on a picture, that card isn't supposed to turn back right away. I thought I could fix this with classes, but it doesn't work. Any suggestions. Here's a part of the code: $(document).ready(function() {                             $("img.spelkort").mouseover(function() {                
  • Insert iframe using jquery? (newbie question)

    I currently have a website with a number of menu items, many of which result in the main site being redisplayed but with an iframe being inserted somewhere within the middle of the page. The iframe is initially loaded as hidden but there is a JavaScript 'onload' routine which calculates the height of the iframe and then makes it visible in order to avoid the iframe showing scrollbars since the content of the iframe is variable. Roughly, things look like this: Menu button:  reloads main page and passes
  • double transition/skipping page

    Hi, I am using $.mobile.changePage("#page") to load another page once a user clicks the submit button, but when the page loads it actually skips one page and goes somewhere else. Anyone knows what is happening?  I have spent a lot of hours debugging but I just can't figure it out. If anyone know what this happens please let me know.  I don't know what else to try. Thank you!
  • how to convert standard HTML node to JQuery?

    Inside a function:   mygrid._in_header_multiselect_filter=function(t,i,d){ The first parameter is a HTML node (http://docs.dhtmlx.com/doku.php?id=dhtmlxgrid:header_extra#custom_shortcuts_creation).   I want to turn it into a JQuery version of the same so I can deal with it using JQuery, i.e. accessing it's children, setting up it's onclick event, etc.   How to convert it to JQuery?
  • How do I prevent a ListView Split Button link from calling the default action?

    jQuery-1.4.1, jQuery Mobile, ASP.net, MVC 2.0 I'm using an anchor tag <a> in a list for deleting an object.  The anchor href is dynamically set and acts as a split button.  I want to pop up a dialog to confirm the delete before it's executed.  The problem is that no matter what I return from the confirm dialog, the default action (ie. href link) is ALWAYS getting called.  I stripped my code down to the basics shown below.  Why doesn't 'returning false' prevent the href from being executed? <div data-role="content">
  • jQuery Frame Animation Plugin and Firefox 4

    Hello out there, It seems that Firefox 4 doesn't like the jQuery Frame Animation plugin. The Error Console seems to throw the following CSS warning which seems related: "Error in parsing value for 'background-position'. Declaration dropped." And this warning will spill out multiple times into the console when the animation is supposed to be happening. (This plugin takes an image that looks more or less like a vertical filmstrip of animation frames, and adjusts the background position quickly to produce
  • Changing an element value before "pagecreate"

    Hi guys, I stumbled upon quite an annoying issue, and I hope you might be able to shed some light on this. What I'm trying to do is simple: Bind a page to a "pagecreate" event. When the method is called, select element/s (in this case - a button) and change its value. After changing the value, I verified that the value was changed (when debugging), but since jquery adds <span> for the button, which holds the old value - the UI was not changed at all. Here's the code: init : function() { $('[data-role="page"]').live('pagecreate',
  • Unified way to change elements values

    Hi guys, My problem here is quite simple: I have a wrapped set of elements, and I would like to change the value of each one of them. Take a look here: init : function() { $('[data-role="page"]').live('pagebeforecreate', function(e) { var page = $(e.target); Localization.localize(page.find('[i18n]')); }); }, localize : function (page) {      page.each(function(){          elem = $(this);           elem.val("My Test"); }); Is there a unified way to change the value of an element without considering
  • Simple problem with onBlur and focus()

    Hello everyone, I'm having a simple/stupid problem with a check-in system I wrote. The computer has a barcode scanner hooked up to it that generates the code and a tab character. When the page on this computer loads, I do a focus() on our input box (only one on the page) and it's ready to scan. When a student scans in their ID, the barcode gets entered into the box and then the box gets tabbed out. The input box has onBlur that fires my jQuery function register_number. This function launches some
  • Form submission opens modal confirmation dialog

    I'm going to preface this by saying I know next to nothing about implementing jquery. Thus far, I've just been very lucky and able to figure out a few things on my own. I have a simple form on my site that, upon clicking "submit" calls a PHP file.  I'd like to have a modal dialog box open when you confirm submission  (like this.... http://jqueryui.com/demos/dialog/) but can't understand how to target the submit button to make this happen. http://theassemblydesign.com/ I already have jquery script
  • Accessing a list after AJAX call

    I have a page that creates one unordered list from the contents of another list. The second list is created from a database query and is hidden on the page. I have written a JQuery function shown below that does an AJAX call which causes the hidden list to be created and that is working perfectly. The problem is that when the code following the AJAX call is executed it doesn't see the hidden list. The alert message displays 0 the first time. clicking on the Load button a second time results in the
  • DatePicker doesn't work in liferay portlet

    hi im using jQuery 1.3.1 and jQuery UI 1.7.2 in my portlet.but i couldn't get a calendar using jQuery datepicker.it doesn't appear on the portlet. this is my code <link type="text/css" href="/WEB-INF/css/themename/jquery- ui-1.7.2.custom.css" rel="Stylesheet" /> Date: <input id="datepicker" type="text"> <script type="text/javascript" src="/WEB-INF/js/jquery-1.3.2.min.js"></ script> <script type="text/javascript" src="/WEB-INF/js/jquery- ui-1.7.2.custom.min.js"></script>     <script type="text/javascript">
  • Hide all but one div

    Hi there, this problem has been bothering me throughout the day and I can't fix it. It seems rather simple, though. I have some divs laid on top of each other. By clicking somewehre specific I want to hide all the divs but except for one - which is related to the point i clicked - to show up. Here is my code so far: The function will be called by something like this: <a href="javascript:void(0)"><img src="album_emilia.jpg" width="90px" height="125px" onclick="setAlbum('emilia')"/><p>Emilia</p></a>
  • Adding element after others

    I have a page with several uls which are enclosed within a div like so: <div id="post_holder">       <ul>             <li></li>       </ul>       <ul>             <li></li>       </ul> </div>i am trying to insert another ul underneath the others within the div. however it inserts the new ul underneath the first ul in the list rather than at the bottom. can anyone see where i am going wrong? var ni = document.getElementById('post_holder'); var new_post = document.createElement('ul'); ni.parentNode.insertBefore(new_post,
  • List & footer problems

    Hi guys, I'm working with lists with thumbnails. I'm using jquery mobile a4.1+ (compiled from git). I have 3 issues: 1) The first item in the list is not correctly aligned, I have to add a hidden entry in order to solve this. 2) The fixed footer is not working very well yet. Is it possible to have real fixed header and footer and the scrollable list? Header and footer shouldn't disappear while scrolling/accessing list items. 3) Scroll perfromances problems. I build the list dynamically. The user
  • Printing with jqprint plugin a div that was edited with jquery

    Hello, how can I print a div that was edited with jQuery. I'm choosing for it a background image from a gallery, and when I'm trying to print it, the image is not printing. How can I solve this problem? Waiting.. Thanks!
  • Getting 'Preferred language' value

    Good day, How to and in which memory variable read the 'Preferred language', and make another HTML page call based on this value ? A HTML instruction, a JavaScript or a jQuery instruction ? Which one ? 'Preferred language' is in fact yet memorized in ... - Mozilla FF browser : Via Menu's : Tools > Options > Content > Languages - IE browser : Via Menu's : Still have to find the path - Google pages : in 'Search parameters' (up right) - in the OS parameters (registry keys) of Microsoft. I assume that
  • Collapsing a list but making the header not link if there is a child

    I have the following list setup I want to toggle open and close a section. This is working with the code I have below except except when you click on the menu item that slides it links to the page. When I set the return to false then all the other links in the list stop working. I think I need to do some <If then> to determine if it is a child but I am so new I am lost. Your help will be appreciated. ul class="menu"     li class="menu-item"        a herf         ul class="sub-menu"             li
  • 'HI' is undefined in jquery-1.3.2.min.js

    I am totally new to jquery. As I started maintenance work on this website which is giving message in browser's status line 'HI' is undefined and it points to file jquery file. Can I modify these JQuery files?   Thank you
  • loaded html and its delegation

    Hello everyone...!! I have this html interface; ( a link, and a div ) Well, yes... once the Link from the UL LIST is clicked then it will load up the HTML file into the Middle DIV   <div id="middle">  </div>  <!-- div middle ended --> <div id="kiri" > <ul id="menu" class="treeview-red">                                         <li><span>Management Setup</span>                                             <ul>                                                 <li id="supplier"><span>Supplier</span></li>
  • :not() selector not working on IE (6 to 9)

    Hello everyone, Here is my problem : I want to select all the h2 in my #corps container, except those with a .post-title class. The following selector doesn't work with IE (from 6 to 9). No problem with Chrome, Firefox, Opera. #corps h2:not(#corps h2.post-title) The HTML: <div id="corps"> <div id="contenu"> <h2>Actualités</h2> <div class="post"> <div class="post-head"> <div class="post-avatar"><img alt="img" src="/img.jpg" /></div> <div class="post-title-info" > <h2 class="post-title"><a href="/blah">Blah</a></h2>
  • loading large data

    hi everyone,   using jquery autocomplete combobox i load more than 25000 data's i set minLength:3, delay: 700, when i start typing three characters, in the third character ie8 shows the "Stop running this script" how to handle this huge amount of data    
  • jquery calander - windows server 2008

    Hi everyone,   i have an issue with jquery datepicker in winndows server 2008 SP1   i  executed my datepicker in window xp ie8 it works fine but when i execute the same datepicker in window server 2008 it cannot able execute it,   any solution   Regards, Elango
  • 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