• function(e)

    Hey, when do i use function(e) and when do i use only function()? $('a').click(function(e) {         var $this = $(this);         if ($this.attr('href').match('google')) {             e.preventDefault();                   }     });In this little example I have to use it but i dont understand in which cases I have to use it? Anyone an easy explanation to help me?
  • Best Practices for Pagination (morenation)

    Has anybody built a good morenation script for a list view?   By morenation I mean a facebook style where the next page is attached to the end of the list rather than pagination where  you would go to the next page. Right now, I have a list view and added a li at the end with my more link.  This is my current code $('.more a').live('click', function(){   Mobile.showIndicator();   var more = $(this);   var list = more.closest('ul,ol');   var url = more.attr('href');   console.log(url.indexOf('?'))
  • Jquery Color change

    Hey, I am currently trying to change the color of my text in jquery.  The problem im having is im not sure how to change my color back to the original css color when I click on the other link.  Instead the color just remains and does not go away. (By the way im not strong on this language so keep it simple for me) Cheers. Here is my code: $('#navigation ul.submenu li a.sug').click(function() {         $('#navigation ul.submenu li a.sug').css("color","#e1519f"); }); $('#navigation ul.submenu li a.man').click(function()
  • Sorting and Hiding list elements

    Let's say I have two lists for menus and one list for sortable content. <ul id="type">       <li>A</li>       <li>B</li>       <li>C</li>       <li>D</li> </ul> <ul id="location">       <li>1</li>       <li>2</li>       <li>3</li>       <li>4</li> </ul> <ul id="content">       <li class="A 1"></li>       <li class="A 2"></li>       <li class="B 2"></li>       <li class="D 4"></li> </ul> If I click on "A" in the #type list, the content list is sorted, the li's with the classes "B" and "D" are hidden
  • jquery html fragment results in different no of elements in internet explorer

    Hi, I tried this code in http://jsfiddle.net/sesrikanth/AyPwh/ jquery reports as 4 elements in firefox/chrome browsers correctly where as 0 in internet explorer 6.0 How do i fix this? Should I report this as bug?
  • Change yes/no labels in jqDialog confirm dialog?

    This seems like it should be easy to do, but I've had no luck. The buttons that come up when I call the "confirm" method from the jqDialog plugin display default values of "yes" and "no." Under most circumstances this is fine, but I need to change their values to "confirm changes" and "discard changes" in one particular case. Can anyone suggest a way to do this? My code so far...                ($).jqDialog.confirm("Do you wish to keep these changes?",                        function() { ... "yes"
  • Display text from selected html tags

    suppose i have a strings (html): Lorem ipsum dolor sit amet, <span id="display_only">consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. </span>Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. How can i display only the text whicj is inside the #display_only tag.... So that the result would be consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt
  • not $(this).....

      $('#radioBtn1,#radioBtn2,#radioBtn3').click(function(e) { e.preventDefault(); $(this).parent().parent().children().addClass('bgImg'); $(this).parent().parent().children().removeClass('bgImg'); //       how do I remove class from two buttons NOT clicked?????   thank you..
  • Images will not show on BlackBerry 9800 simulator

    I have tried both the data-icon attribute and the standard icon that gets displayed with say a data-role="collapsible" element.  What is rendered is a grey circle without the icon in the middle.  I have tried different themes with the same result.    
  • Form Validation Question

    Hello All, I'm a bit stumped on what the best way to validate my form that I have built out. Here is the form. http://pretendcity.org/temp/asq/index.html This is what I need it to have do: 1. If the user select "My Child is older than 5 1/2" the form should decline. 2. ZIP code has to be one of the ones I have from a list I was given (about 50 ZIP codes) I cannot figure out how to do both, I was told to do the ZIP by passing it through with an array but I'm not too familiar with jQuery or java (im
  • ScrollTo code is not work completely in safari opera and firefox(new version)

    this is my site www.amarintra.com So I don't know why my navigation has moving without effect. Please help me 
  • Problem with IE8 and slideUp

    Hi and i hope youll be able to help me. Im writing a little script thats supposed to show a sublist when a link is clicked and hide all other sublists at the same time. And it works fine except of course in IE8... When i click the link there it just expands a bit and then hides again. I tried everything i could think of.. i tried commenting out everything except for the line thats supposed to show it and changing the method to show(). That shows it, but when using slideToggle() or toggle() there
  • I tried to prevent history stack change and dont know if i was successfull

    Hello! I got a few links for interaction only. The links should display the servers html result but not change the history stack. acting more like an input form... For simplicity i wouldnt write javascript event code for handling stuff. So i started with this html markup. <a href="/bla/fourtytwo/hangman" data-changepage="false">change form values</a> I've implemented my new data attribute changepage in jquery.mobile.navigation.js. It seems to work but because i dont have a glimpse about jqm core
  • Firebug and hidden input fields

    Hi, I have 5 hidden input fields in a form that I'm processing in jquery with $('#some-id').val(); which works fine in Firefox with Firebug not installed (and also other browsers). However if I have Firebug installed it deletes some of the values of the hidden input fields and some get mixed up, seemingly at random. It works fine if I change the input fields to text fields, but obviously I don't want that. Anyone else come across this problem? Is there a way around this? Most users won't have firebug
  • Multiple Selectors

    I am having trouble with using multiple selectors for my table striping. I am currently using the following. $("table:not(.no-stripe) tr:odd").addClass("tablestripe"); This works great except that occasionally there will be a row in the table that has a class assigned to it that ends with "tablehead" to give a different background and font color to the row. I don't want those rows to be affected by the striping. <tr class="dkredtablehead"> I am also using         $("table:not(.no-stripe) tr:not([class*='tablehead'])").hover(
  • player in iframe

    Hi everyone, I have a default.asp page and within an iframe that displays another page with a video. (there are used SWFObject and jwplayer). how do I take the player object (within iframe) from default page? so, that I could trigger a play/stop function? thanks a lot bye
  • Datepicker animation problem - jquery-1.5.1

    Hi, I hope I have posted in the right area, not sure if datepicker is part of jquery or a plugin... The problem I have is as soon as I add an animation to datepicker it stops working. You cannot open the datepicker anymore. The code I have is very simple: $(function()     {         /* Add menu bar at bottom of the picker */         $( "#datepicker" ).datepicker({             showButtonPanel: true,             showOn: "button",             buttonImage: "img/calendar.gif",             buttonImageOnly:
  • Help to modify a jquery script

    Hi! I need help from you, sorry for my english, I hope you understand me... I have a gallery made with jquery, based on this example: http://demo.webdeveloperplus.com/featured-content-slider/ So, I'd like to have the transition effect not only in the main image, but on the right - grey panel too. The script I actually use is very simple: $(document).ready(function(){ $("#featured").tabs({fx:{opacity: "toggle"}}).tabs("rotate", 5000, true); }); Can you help me to modify it as I need? Thank you very
  • how to get multiple form input, select values from the same page in php?

    I have multiple <select></select> elements in a php page. After an option is chosen from the first drop down <select></select> element, options of the 2nd drop down  <select></select> element will show up. Selection of an option from the 2nd drop down list will get the options in the 3rd dropdown list show up. Thus input from the 3rd drop down list will show up the options in the 4th drop down list. Such is the case for the 4th, 5th ,... drop down list.  each time depending on the inputs from the
  • Adding code to parent from within iframe?

    I'm not sure if this is something that it makes sense to use jQuery for or whether I can just use a bit of javascript to achieve the same thing, or whether it can be done at all. I've spent quite some time trying to understand the issue but have very little javascript or jQuery knowledge so hoping someone can help me out. What I want to be able to from within an iframe is: check if parent.window.document.getElementById("autoloadpop") is null and if so I want to add: <a href='popup.php' id='autoloadpop'
  • Cascade update of input text boxes

    I have 3 input text elements: <html>     <head>     <title></title>         <script type="text/javascript" src="../lib/jquery/jquery.js"></script>         <script type="text/javascript">             $(document).ready(function()             {                 $("#text1").keyup(function() {                     $("#text2").val($(this).val());                     return true;                 });             });         </script>     </head>     <body>         <p>Text1: <input type="text" name="text1"
  • Maphilight or similar plugin, recursive mouseover()

    Hi, I'm looking for a plugin, where I can highlight area-ojects on mouseover() . I tried using maphilight for this but I'm getting a problem with the following idea : When user gets over field_a, field_a and field_b should be highlighted. When user gets over field_b, field_a and field_b should be highlighted. I thought of something similar to this jQuery('#field_a').mouseover(function(e) {             jQuery('#field_b').mouseover();         }).mouseout(function(e) {             jQuery('#field_b').mouseout();
  • Possible stackoverflow in my code?

    Hi, I'm trying to make a vertical image-scroller with mouse kind-of-tracking detection, and I'm doing it good so far. You can have a look at http://www.bodegascampos.org/atmoshpera/  It's at the top of the page and it's scrolling a few images (currently 3). Anyways, I detected 2 bugs that I don't know how to fix, so I'll be glad if somebody could help me with this. First bug: Sometimes pictures don't load (the "Loading" div just stays there). Can't reproduce it always, but I'm pretty sure that it
  • dialog in tab not refreshing

    OK.  I have an admin interface that uses tabs.  I have some modal forms in the tabs.  This is all good while everything is static. I then made the tabs content load using ajax.  This is also fine and works well.  Everything is going swimmingly. Here's the problem. The modal forms get content from the database.  So, on tab 0 my form uses information that can be edited on tab 1. When I go to tab1 and edit the info, then return to tab 0 I can see that the dialog is the original dialog.  Firebug shows
  • jQuery random image

    Hi everyone, I'm using the jQuery Tools showreel plugin http://flowplayer.org/tools/tabs/slideshow.html Basically I am just showing 6 images. But the thing is the client wants a random image to appear at the start. So the same image isn't the same every-time someone goes onto the website. Can anyone help: Here is my code: jQuery(document).ready(function($) { $(".slidetabs").tabs(".images > div", { // enable "cross-fading" effect effect: 'fade', fadeOutSpeed: "slow", // start from the beginning after
  • stop() does not clear delay()

    When calling the following line repeatedly on some element, the delay() in the queue is never stopped from running. $('#element').stop(true,true).show().delay(2000).fadeOut(1000);
  • a probelm in positioning accordion control

    i have a header div that is fixed positioned and also i have accordion control that i am using as a side panel, the probelm is that the accordion appears at the top of the header when scrolling down. so how to make the accordion down the header. thanks
  • How do I prevent page from scrolling in IE

    Hi, I am making a game using the gameQuery library. The game is contained in an iframe and everything works fine in any other browser than IE. The iframe has it's own js that handles the whole game logic. I need the controls to be with the arrows. Here is all I've tried to prevent it from scrolling. This js is included in the containing page : $(document).keypress(function(e) {     console.log("keypress_SCROLLS");     e.stopPropagation();     e.preventDefault();     return false; }); $(document).keydown(function(e)
  • jQuery not recognizing <embed> element in IE

    Hi Guys, The following line give me two different result in IE and Firfox. Does anyone have any idea? alert (  $('#top-ad object').children().length  ); //IE return 3 //Firefox return 4 so it looks like jQuery not recognizing <embed> element in IE. So how can I select that embed thing. Thanks <div id="top-ad"> <object....>      <param....>      <param....>      <param....>      <embed...> </object
  • jQuery Mobile problems with JQuery UI Grid

    Hi, I´m playing around with a mobile web prototype, using jQuery Mobile alpha 4. In the prototype I´m using the jQuery UI grid. But the rows is not showing when the mobile js is referenced, using templates. Using a pre-filled table other grid function like a select function doesn´t work. Removing the reference and running the same code with only jQuery works fine. I´m not expecting that the should work together at this stage, but I´m curious if anyone else tried this or have any info on the subject.
  • Error when I upload News ticker

    I have tested news ticker at URL: http://www.makemineatriple.com/ I have put all working code at URL and seen error inside function: $ is not a function $(document).ready(function() { Javascript is at the top of website: <script language="JavaScript" type="text/javascript"> /*<![CDATA[*/ $(document).ready(function() {     var options = {           newsList: "#news",          startDelay: 10,          placeHolder1: " []"     }     $().newsTicker(options); }); /*]]>*/ </script> Do you have idea how
  • Accordian height problem

    I'm having some kind of animation problem with my accordian. For one of the panels I have set a fixed height. This naturally changed the height of the other panels. So I changed the autoHeight property, but this seems to cause some animation problems. When I switch from the large panel to the other ones I get some bad jerky animation which seems to fly around the page until it settles. Any ideas how to fix this? In my .js file I have $(function(){     $("#accordion ").accordion({         autoHeight:
  • How to show all news items in one shoot?

    I have test plugin news ticker like URL at: http://www.makemineatriple.com/news-ticker-documentation/   I have seen there is function and setting like:         tickerRate: 80, Is there possibility to show all items in one shoot? Now is shown one character by one. 
  • Modify options and use it in my jquery plugin methods

    Hy all, It's the first time i try to create a jquery plugin using the official Plugins/Authorizing . Please see above a little example of my first test : (function( $ ){       var methods = {             init: function( settings ){                   // Treatments                    alert( settings.my_setting1 );             },             function1: function( settings ){                   // Treatments                    alert(  settings.my_setting2  );             }       }       $(this).change(function(
  • AutoComplete ComboBox Behavior

    http://jqueryui.com/demos/autocomplete/#combobox It looks great, but it still can't compare to the native combobox because pressing alt + down, the selected option is hard to observe in the items. clicking the button, the selected option doesn't highlighted in the items. If the input element is shorter than the textual description, the text inside the input element will be moved (i.e. "....XYZ" instead of "ABC......") How to do these to made it better?
  • jQuery Mobile rendering problems with content being added after the page is initialized?

    I'm using jQuery Mobile and Backbone JS for a project. It's mostly working, using jQuery Mobile's event 'pagebeforeshow' to trigger the correct Backbone View. In the Backbone View for that particular jQuery Mobile page, that's where it's doing all the dynamic things needed. Some of the things the views do is pull in certain bits using Underscore's templating system. This is all great until where I pulling in form bits using the templating system. For example, a set of dynamic radio buttons (which
  • resizable div in resizable div

    Hi, A have div in div:             <div id="A" >                 <div id="B" ></div>             </div> A and B are resizable. $( "#A" ).resizable(); $( "#B" ).resizable(); All work fine, but if A set as disable, $( "#A" ).resizable("disable");  B div is disabled too. Exist any solution, how disabled only div A?
  • Event Handler triggered for certain time + smooth animation

    I'm trying to get smooth scrolling done on a huge horizontal slide. I've got Event Handler for mousewheel working but the animation is choppy as h&%l. You can see the test here. Test is inspired by these guys. The way it works now: delta (mousewheel scroll) is positive or negative. Now it adds or subtract a value on variable for maximum negative margin. Scrolling of DIV is done by immediately change of value for leftMargin. What I want ; something like delta change smooth out with .animate() over
  • Validate - one or more checkboxes

    Hi, I'm having a bit of trouble finding the right way to do this: I have three checkboxes and the user must choose at least one of them. The code below works, but if the user checks one, the error label is only removed from that particular checkbox (submitting the form works though, so it is only a cosmetic error). How can I remove the errors from the other checkboxes as well, preferably from within the validation method below. jQuery.validator.addMethod("oneselected", function(value, element) {
  • Solution slider change swipeleft events

    Hello everyone, I have found a "workaround" for the next situation, but i'm interested in hearing alternative solutions. Context: A jqm dashboard page which listens to the swipeleft event. A jqm slider on the dashboard page. Challenge: When sliding the handler of the slider to the left....swipeleft is triggered and i'm gone off to the next page... So, how to prevent swipeleft in this case from doing what is does? Of course, when swipingleft on the rest of the page this should work as normal. Question:
  • 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