• how to loop a chained pattern?

    Here are 3 chained patterns that I am trying to get compressed into "possibly" one line with the help of a looping mechanism like the each() method... $("#background1").css("left",(parseInt($("#background1").css("left")) - smallStarSpeed - PLAYGROUND_WIDTH) % (-2 * PLAYGROUND_WIDTH) + PLAYGROUND_WIDTH); $("#background2").css("left",(parseInt($("#background2").css("left")) - mediumStarSpeed - PLAYGROUND_WIDTH) % (-2 * PLAYGROUND_WIDTH) + PLAYGROUND_WIDTH); $("#background3").css("left",(parseInt($("#background3").css("left"))
  • how to retrieve a session variable ?

    Hello, I'm new to the site and start with jquery. I like to know how to retrieve a session variable. I use the Spring MVC , below my code (controller + jsp) in the controller, I put my session variable model.addAttribute("tabDay", getJoursFeriescalendrierDefaut()); getJoursFeriescalendrierDefaut () return a list of string Int the JSP <script type="text/javascript" charset="utf-8"> var tabJoursFeries=${tabDay}; //not working alert(tabJoursFeries) var tabJoursFeries2=$(tabDay); //not working alert(tabJoursFeries2)
  • cant get 2 jquery codes to work on same page

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml">     <head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />         <title>Image Hover Move- simple and practical navigation or featured image jQuery plugin</title>                  <link href="jimgMenu.css" rel="stylesheet" type="text/css" /> <script type="text/javascript" src="js/jquery.js"></script><script type="text/javascript"
  • droppable kicks in only after hovering the upper div-side

    I have a div which start with width:0 & height: 45px.  when a droppable accepted object is 'picked up' (being dragged) a jQuery animation expends the div to width:135px, then the div should accept objects as it was defined as when the page finished loading. strangly enough the droppable is not enabled until the object crosses the top side of the div, after it does though, it works normal. Any ideas? css: #shareArea {     background-color:rgba(255, 255, 255, 0.8);     position: absolute;     top:
  • type=search - mini version

    Hi All,   I'm trying to create a header bar that has a home button on the right, title in the middle and search bar on the right.   Whenever I use the search input, it seems to want to break onto a new line. Does anyone know how I can avoid this?   Thanks Warrick    
  • JQuery UI Dialog box- TOO WIDE when displayed on small mobile screens

    How do I change the width of the jQuery dialog box?  I am using it on a mobile website and it works fine for screens that are greater than 320x480.   But if the screen is really narrow  (like 240 wide), the box is too big for the screen.  I use the following doc type. <!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.0//EN" "http://www.wapforum.org/DTD/xhtml-mobile10.dtd"> This is the function that calls the dialog.  function dialog2Button(title,message,button1,action1,button2,action2) {     
  • Context Menu

    Ive been trying to get an example of a context menu working as simply as possible, but for some reason I cannot get it to work. Ive been playing with this on and off for a few months now, but really need to get it working, so requesting any experts help.   I have attached my code as test.txt   Ive been using the examples at medialize.github but without any sucess. If anyone has any advice, I would be extreamly gratful. Thank you
  • Jquery load and Yoxview

    Masters,  I try to explain my problem:  I have: main.php; sub1.php; sub2.php  I use jquery load to load part of html from sub1.php, sub2.php to main.php.  This works well. I use this tutorial:  http://demos.malbecmedia.com/ajax-site-demo/  On the sub1.php i use YoxView  <div id="ajax-wrap">           <div id="text">             <div class="product_image hatter1"><a href="images/galeria/test.JPG" class='multi1'><span ><br/>span text span text span text </span></a></div>          </div>  </div> If
  • How to make multiple dropdown for the same images?

    Hi, Please help in following issue, Whenever I click the first arrow icon in below image, I am able to get the below dropdown, but, My problem is, I am unable to get the dropdown when I click the remaining arrows. I need to show dropdown menu when I click all the arrows. help me in this issue, thanks in adv.. Suren
  • ASP Scripts SRC Folder Not Working?

    I can run this code fine using the Google URL for the SRC, but... <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.0/jquery.min.js"></script> <script type="text/javascript"> $(document).ready(function () {    $("#<%=lblStatus.ClientID %>").delay(1500).fadeTo("fast", 0.0); }); </script>     I cannot run the same code if I swap-out this line of code: <script type="text/javascript" src="/scripts/jquery-1.8.0.js"></script>   It gets better, I can easily access the .js
  • [jQuery] UI/Accordion - Possible to deep-link?

    Hi, This is probably a stupid question, but I've been scouring around trying to find an answer to no avail. Is is possible to have a hyperlink that links to the accordion on another page in such a way that it opens a specific accordion element? For instance, I have a page where I want to include an accordion where each accordion element is a different service offered by my company. On another page, I want to have a series of links, each one linking to a different element in the accordion, so that
  • Count nr of divs apply class to every fifth

    Hi, i have a structure which looks like <row> <div class="onecol"></div> <div class="onecol"></div> <div class="onecol"></div> <div class="onecol"></div> <div class="onecol last"></div> <div class="onecol"></div> <div class="onecol"></div> <div class="onecol"></div> <div class="onecol"></div> <div class="onecol last"></div> </row> all divs are generated dynamic, so the amount can vary from 5 to 25 divs. Is it possible to set a rule saying, apply class "last" to every fifth div with the class "onecol"?
  • Simple Fade and Hide Problem

    Basically I am displaying a images in a row. Each image will have a mouseover and out event, like so function fadeIn(a) { jQuery(a).find(".thumbnail").fadeTo("slow", 0.7);  jQuery(a).find(".thumbnailText").show('fast'); }The mouse over will show a div container which lies on top of the image. When I mouse of the image away from the area where the new div appears its fine. However when I move over the new div it repeatable appears and disappears. The reason for this I reckon is because its being read
  • graphic not showed in jqplot

    Hi. I'm trying to add jqplot to my project. I have extracted to a folder called jqplot in my netbeans 7.2 IDE. later in my config file I add the next:         <!--[if lt IE 9]><script language="javascript" type="text/javascript" src="jqplot/excanvas.js"></script><![endif]-->         <script language="javascript" type="text/javascript" src="jqplot/jquery.min.js"></script>         <script language="javascript" type="text/javascript" src="jqplot/jquery.jqplot.min.js"></script>         <link rel="stylesheet"
  • Show Hide on mass level

    I use the Show/ Hide .hover function but on a large scale and for 2 different things.. i was just wondering if there is anyway to shrink it... it's not causing a problem and works just fine but could potentially be smaller. however; one set of the script works from images hover and displays an infobox on the left side about the "company" the other, works on links and images, again showing on the left side (set position). if no way to shrink it thanks anyway :)         $(document).ready(function()
  • Which chart use in JQM to add events??

    Hi. I have been using charts in conjuntion with a map to show an elevation profile (map + chart in the same page) One div for the map, and one another for the chart.. Using code in https://developers.google.com/maps/documentation/javascript/elevation everythings ok, but chart is not correctly showed in most mobiles, in web page and simulators works great. So, my question is: I need to change google chart and use another open source library chart which work ok in jquery mobile and had the posibility
  • Close button is not working.

    Hi, I referred this website. http://www.erichynds.com/jquery/jquery-ui-multiselect-widget/ I couldn't close the drop down list box while clicking the close button. I implemented it in my application. But close button alone is not working. Can anybody give me a solution. Thanks in advance.
  • expected url format for local html files?

    Hello - I've created a list within a jQuery mobile page named Home.html.  I'm developing the page on my laptop in my own personal dev environment. I want the first button in my list to be a "Locations" button that redirects to my Locations page. I've created a Locations.html page in the same directory as my Home.html page.  What's the proper url to use for the a href within the li?  I tried the following 2 urls but when I click on either of these urls my page displays a jQuery Mobile dialog that
  • "open dialog" button displaying as url instead of button

    Hello - I'm using the following anchor per the jQuery Mobile website to implement a basic modal dialog: <a href="http://www.google.com" data-rel="dialog">Open Dialog</a> Unfortunately, this is only displaying an anchor, not the Open dialog button.  Also, when I click on the url, the page redirects to the url in full page mode instead of displaying the redirect url in a dialog.  What am I missing?  I have attached a text file of my webpage....
  • getJSON

    Hi, I have an issue with the getJSON method, here is the code of the jquery: $(document).ready(function(){ $.getJSON('../php/functions/user_info.php', {id: id}, function(data){ alert(data); }); });the php code at ../php/functions/user_info.php is: <?php require_once 'connection.php'; $link = conenct('localhost', 'root', '', 'w_db'); mysql_query( "SET NAMES utf8" ); mysql_query( "SET CHARACTER SET utf8" ); mysql_set_charset('utf8', $link); $id = $_POST['id']; $id = mysql_real_escape_string($id); $query
  • why :not(selector) does not working when we feed a complex selector to :not()

    jquery: $("p:not(p:eq(0))").css("border","3px solid red"); html <p class="para1">This is paragraph 1:</p>         <p class="a">This is paragraph 2:</p>         <p class="para2">This is paragraph 3:</p>         <p class="a">This is paragraph 4:</p>         <p>This is paragraph 5:</p> can you please help?
  • background image replace?

    i have a bgimage  in the css definition like DIV#container_footer{ position:fixed; height: 128px; min-width: 1000px; width:100%; bottom:0px; background-image: url(../images/tin/footer_0.png); background-repeat:repeat-x; background-position: center bottom;  margin: 0 auto; } and i want to change it in thsi function function changeTin (i) {   var url = "url(../images/tin/footer_"+i+".png)"; $("#container_footer").css("backgroundImage","url("+url+")"); //$("#container_footer").css('backgroundImage',
  • Help adapting code for one slideshow so it supports two (multiple) on same page.

    This code I found works great for one slideshow, but I need to have two side-by-side and I'm a novice, so I can't see a good way to do this: The page I am working on is here: http://www.nuancepress.com/nuance-press-announces-2-volume-collection-of-the-best-of-fantasy-and-horror-artist-d-x-stone/ There are two slideshows (#dk-ad and #lt-ad) and they need to function independently of one another. There is probably an easy way to do this but since I'm a total hack I'll probably end up duplicating a
  • Adding to Option element to table cell

    I am novice to jQuery, and I had to do some small jQuery job at my hand, but i am unable to make it work. The thing is, the exisiting code is generating a modal popup containing table rows, with Option element(op1) which gets its data from DB, But I am adding a small filter to that Option value, So When I add a new Option element on its change, it just add to the first row, and not to current row.   For instance the modal popup have 5 table rows to enter data for 5 people, and there is a dropdown
  • Datepicker change the date format to DD, d MM yy..and i have it working But !

    Me and my datepicker again haha,,   Looking to change the date format to DD, d MM yy..and i  have it working,, with this code :   <script>     jQuery.datepicker.setDefaults({dateFormat:"DD, d MM yy"});    </script>                               Or this <script>   $.datepicker.setDefaults({dateFormat: 'DD, d MM yy'});   <!-- $('#datepicker1, #datepicker2').datepicker();  --> </script>   but its not how the demo show you, This being the Demo and the rest of my code:   Demo <script type="text/javascript">
  • Apply background color to multiple td's when its id is known

    Hi all, I have a jquery function which gets the id value of td's whose checkboxes are checked. I need to color those td's. I have written this function which does not give me any error but does not color the td's also.. Here is the function: $('#custom-interval-tbl td').each(function() {  $(this).find('input:checkbox:checked').each(function() {           var tdId= $(this).attr("id");     var tdElement = $("#custom-interval-tbl td").eq(tdId);      console.log("D Element"+tdElement);             tdElement.css({background:"#333333"});
  • difference in length innerText and text()

    Hi,Why does this give different results? var v=document.createElement("br"); alert("v"+$(v).text().length+v.outerHTML): returns zero alert("vg "+$(v).get(0).innerText.length): returns 1Regards
  • Tabbing past Datepicker control

    Hi,   I am having a problem where I have to hit tab twice before my datepicker control will lose it's focus.  No matter if you type in a date, or select a date from the calendar the next control won't gain focus until you hit tab a second time.  The first time you hit the tab button the calendar disappears then the second time the next control with get the focus.  The desired response is that the first tab will close the calendar and also move to the next control on the page.  I am using jquery 1.7.2
  • How do I narrow down on this error?

    I am using JqGrid to display a datagrid on my page. When I single click a row, it throws the following error but it lands in Jquery file. Timestamp: 8/15/2012 9:20:44 AM Error: TypeError: elem is null Source File: http://localhost/lavanyadeepak/Scripts/jquery-1.7.2.js Line: 1903 Is there a way to find out the source of this error?
  • Error in jquery.ui.core.js, line 209?

    I use jqGrid-4.3.3 in my asp.net mvc 3 app with jquery-ui-1.8.21.custom package.  When I run my website in IE8, I got this error in an IE pop: '3' is null or not an object in jquery.ui.core.js, line 209 character 3, which I show here: function visible( element ) { return !$( element ).parents().andSelf().filter(function() { return $.curCSS( this, "visibility" ) === "hidden" || $.expr.filters.hidden( this ); }).length; } $.extend( $.expr[ ":" ], { data: function( elem, i, match ) { return !!$.data(
  • toggle/update container height when accordion opens

    hello, I want to set a container's height dynamically (and maybe animate) when I open the accordion menu. this is my html code <div id="top"></div> <div id="container">   <div id="left">     <div class="logo"></div>     <nav id="menu">       <ul class="menu">          <li><a href="#">link</a></li>          <li><a href="#">link</a>               <ul class="submenu">                 <li><a href="#">link</a></li>                 <li><a href="#">link</a></li>                 <li><a href="#">link</a></li>
  • Solving cross browser issues in dynamically detecting textarea text value changes

    I have developed a webpage with a form that has (1) a textarea into which a user can input text of any length (right now it is 800px wide and 120px high), and (2) an input text box into which a user can input a number of days over which the textarea text should be considered active.  The form has two buttons that are enabled or disabled whenever any changes in either the textarea or input box differ from the original “reset” values.  The two buttons represent submit and reset actions.   I wanted
  • jquery event existence

    Hi, is there any way to do the next: lets assume I 2 buttons (b1 and b2) have a button and when I click b2 it's like i'm clicking number 2? I am using the dreamweaver SpryTabbedPanels and I want to create anther element that when I will click it, it would be the same as I have clicked on the the tab label. hope my explanation is good enough. thanks   
  • closing tags check <br/> <input/>

    Hi, How to check if an element has or not a closing tag? Example: 'input' and 'br' have no closing tags. Is there a way to know when traversing nodes? Regards
  • Internet Explorer freezes for TR (rows)...

    I have the following code in JqGrid onLoadComplete event. IE freezes and goes into Not Responding for a few seconds to minutes whereas FF/Chrome render it in a jiffy.             loadComplete: function () {                 jQuery("#list1").trigger("reloadGrid"); // Call to fix client-side sorting                 //Set Tooltips ...                 var ids = "" + $("#list1").getDataIDs();  //list1 is the table name which is also rendered as JqGrid                 var arrIds = ids.split(",");      
  • outerWidth(), IE and percentage

    So I don't know why, but it seems outerWidth() isn't working properly for me. I have this <div> that I give a width of 70% inside a 800px <div>. The first <div> should then have a width of 560px. So I'm trying to get the computed width of my element, and I thought outerWidth was supposed to do it since in the documentation it says:  Returns the width of the element, along with left and right padding, border, and optionally margin, in pixels. For some reason however, it refuses to output the width
  • JQuery Compatibility Mode Detection

    Is there  a way we can detect if the browser is running in compatibility mode and preferably switch the browser to IE 9 standards mode automatically?
  • trying to learn custom functions / methods in jQuery

    I have some code that initializes text when the user changes country and when the page load determines the country from W3C geocoding.  It works in Firefox and Chrome, but not IE, and Firebug says changeCountry is not a function.     $('input[name=country]').change(function changeCountry(countryChangeCounter){         countrySelected = $('input[name=country]:checked').val();  //sets country abbreviation       //do stuff     }).filter(':checked').trigger('change');  //at ready, fire a change on the
  • difference beween ,contents() and contents().contents()

    Hi, To get all textnodes in a paragraph I'm doing this: $('* p',$(frame).contents()).contents().filter(function(){  return this.nodeType == 3; }).wrap("<span/>"); because if I do it with just one contents() call: $('* p',$(frame).contents())..filter(function(){  return this.nodeType == 3; }).wrap("<span/>"); it won't get me all the textnodes. Shouldn't just one call to contents() get all the textnodes at once? Regards
  • Problem with variable length substring

    Need to retrieve the eventID for the example. The event ID range length (1 to 4 charachers) Start at position 12. var eventID = $(this).text(); alert(eventID.substring(12, 4)) ;
  • 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