• 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='+
  • 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?
  • 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
  • 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>
  • Having a problem with a rotator. displaying in firefox, but not Chrome or IE

    I made a quote slider on a website im helping build, it works in Firefox, but not Chrome or IE,  below is a link to the site, and also my code. www.GQCoatings.com <script language="javascript" type="text/javascript"  src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.1/jquery.min.js"</script>  <script language="javascript">  $(document).ready(function(){ $('#testimonials .slide'); setInterval(function(){ $('#testimonials .slide').filter(':visible').fadeOut(1000,function(){ if($(this).next('li.slide').size()){
  • Problems with slideUp in Chrome

    Hi, after Domready some elements are added and modified to the site. After this i'm sliding up these elements with     $(myParent).find('span.' + myClass).slideUp(1); // slow also doesn't work this works fine in any browser (e.g. firefox, IE, etc.)... but not in Google Chrome. if i call the object text with aller() it works fine in chrome also hide() works but not slideUp... after the element is done and i click a link that calls slideDown eg slideUp it works fine but not in the first call after
  • deferred.resolve() - query on usage as a callback

    In this question on Stackoverflow, I suggested use of $.Deferred() My original fiddle for a solution used a separate callback function which just called def.resolve(). However I then remembered that I've seen other code simply pass "def.resolve" as a callback in its own right.  I tried this instead, and it works (see http://jsfiddle.net/Nyg4y/3/). This got me wondering - how does this work?  As I understand it for this to work at all the value 'def.resolve' must be specific to 'def'. This suggests
  • how to remove the elements returned in an array?

    hello, i have a var  ids = [] that returns some id's. for example <li id="11"></li> <li id="12"></li> the variable ids will be return 11,12. what i want to do is to find those <li>'s  with those id's and remove them. thanks,
  • Coordinates Function

    Is there a way to write a function that would be.... If the coordinates of an image are _____ then do this ______ ?
  • Nested Tabs!!!!

    I have a nested tab scenario <div id="tabs">         <ul>             <li><a href="#tabs-1">Nunc tincidunt</a></li>         </ul>        <div id="tabs-1">     <div id="childtabs">             <ul>                     <li><a href="#tabs-1-1">Child Tab1</a></li>                     <li><a href="#tabs-1-2">Child Tab2</a></li>             </ul>             <div id="tabs-1-1">content</div>            <div id="tabs-1-2">content2</div>     </div>        </div>  <script type="text/javascript">         $(function()
  • about: .accordion("option","event",'mouseover') invalid

    js code: $( "#accordion").accordion(); //set event 'mouseover' on which to trigger the accordion $('#accordion').accordion('option', 'event', 'mouseover'); but seen not take effect~ then: alert($( "#accordion").accordion("option","event")); print:'mouseover' how write when I want to set event on which to trigger the accordion. not at initialization ($( "#accordion").accordion({event:"mouseover"})) thanks~ 饭疏食饮水,曲肱而枕之,乐亦在其中矣。不义而富且贵,于我如浮云。
  • One function to slideToggle dynamically added elements

    My page will have 100+ links on an image map.  Each of these links will have a hidden div associated with it.  i.e. So the first link when clicked should toggle it's corresponding div.  I don't know why this isn't working.  any help is appreciated. <!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> <script type="text/javascript" src="jquery.js"> </script> <style type="text/css">
  • HTMLAREA and Validation

    I am trying to use the validation plugin with http://remiya.com/htmlbox/index.php/9/demo/full-featured-demo.html and am running into an issue. When submitting the form with nothing in it, it will place the error label after the required textarea but will not remove it once you begin typing, only on the form submission. Suggestions?
  • Strange jQuery error?

    I am deploying a new part of our website, and everything was working fine while I was deving on my local machine.  After uploading the scripts, Firebug returns an error but it is not at all descriptive of what it doesn't like. The error says: $(  Cancel: function () {   <filename><line number> Does anybody have any suggestions of what this might mean?  The error happens when you click the "edit" button next to a row, and a jQuery dialog pops up. The line number points to where the Cancel button is
  • problem changing datepicker's date format of

    I am having difficulty trying to change the format of selected date from date picker. This is a test so my code is very simple. Here it is.     $("#datepicker").datepick({                onSelect: function(dates) {             alert('date picked is ' + dates);                        var f = $.datepick.formatDate("mm-dd-yyyy",dates);             alert(f);              }                       }); I have also tried setting the dateformat property but that doesn't work either.     $("#datepicker").datepick({   
  • DatePicker Size

    I am viewing my datepicker with no problem but it is twice as large as the examples, any ideas what I need to do to make the calendar smaller like the example you show?
  • datepicker updating wrong tab

    The datepickers in tabs-2 will update tabs-1 even though the selecter used explicitly states tabs-2.  How do I get the datepickers to update the tabs they are on?   <!DOCTYPE html> <html> <head>  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />  <title>Datepicker/Tabs</title>  <link href="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.10/themes/start/jquery-ui.css" type="text/css" rel="Stylesheet" />  <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js"></script>
  • Setting class on td with attr

    Hi, I am pretty new to jquery and am trying to set the class value on a td cell.  It looks as though it is crashing on setting the attr value.  This is effectively what I am trying to do. // get my row var row = $("#tableID").find("tr:eq(0)"); // get the cells in this row var cells = row.find("td"); // manipulate the cells cells[1].innerHTML = "Some Text"; cells[2].attr("class", "my-class"); Setting the innerHTML works fine, so I am assuming everything before that is working correctly.  When I try
  • jQuery UI Accordion - 3 levels with current page function

    Hey guys. Working on a clients website the last few days. Have been half looking at different accordion menu options. Obviously I want to use jQuery and I really like the options the UI Accordion offers (like current page function). What I need from the accordion, which may or may not be possible using the UI one, is a third (and possibly fourth) level. Finding a reliable way to have the accordion get the current page and stay open has been an issue. I've tried a few ways but things dont seem to
  • how to find the id of an <li> from another file on the server ?

    hey people... i've got a file that contains multiple <li> with different id's: <li id="1"></li> <li id="2"></li> <li id="3"></li> ... how can i gram the those id's and put them into a var? var get_id = $source.find('li').attr('id');  ??
  • Nested Scrollviews Swipe - horizontal

    The swipe works nice, but I was wondering if anyone has figured out how to make a "prev" and "next" button to go along with this.     http://jquerymobile.com/test/experiments/scrollview/scrollview-nested.html The swipe works nice :)
  • JQuerry Board Game

    Hi Folks, I am trying to get a "game piece" to move around a board.  I have it animating with a die that it rolls.  So if you roll a 6 it will animate 6 times 110px.  Each box on the game is 110px.  The problem I am having is changing the direction of the animation once it hits a certain point. Any thoughts or ideas?  I am new to jQuery. Below is my code. and here is the test link http://kyledicke.com/game/index5.html <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  • Swipe Event

    I've searched the forums and some slightly describe what the JS should look like, but none show the whole implementation. I'm a complete noob to js and was hoping to get some help. All I want to do is implement the swipe left and right feature to move the page forward or backward. I have no idea how to do it. What does the JS look like? What should the html look like? Nothing fancy just loading whole new pages, that's all. Later down the road when I become educated, I'm sure there's probably a way
  • Access the Object that was clicked?

    Hello everybody, i have function appended to a click event of more than one objects. How can i check if the object that was clicked has a certain class xy? var t = jQuery(this); jQuery(t.children()).click(function(e) {       if (??check if the element that was clicked has class xy??){} }
  • How to get selected date + 1day with datepicker??

    Hello, I am using datepicker and i have two input fields (i.e. Arrival and Departure). How do i set Departure date to be arrival Date + 1 day?? i have the following function with arrival onClose function clearEndDate(){                                    var date = arrival.datepicker('getDate');                               departure.datepicker('setDate',date);                 }Which set the departure date to be equal to arrival date. any suggestions?
  • linking to item within toggle (show/hide)

    I am using this code to separate information into sections using show/hide. I want to be able to link to a specific item within a section which is also within a tab. Example: I want to link to Bret Fetzer in Cultural Programs which is in the Staff tab. http://www.4culture.org/test/about/leadership/ Is this possible? I am already using #staff to open the staff tab. thanks in advance!
  • How to split the responsetext

    I use this on a select box: <script type="text/javascript"> $(document).ready(function(){      $("#states").change(onSelectChange);  }); function onSelectChange(){      var selected = $("#states").val();     if (selected.length > 0) {         $.post("pwcheck.asp", { state: selected }, function(data) {             $("#output").html(data);         });     } } </script> and it works great. What I want to do is write to two divs instead on only one (#output). I created an ASP page that returns text~~~text2.
  • Is it possible to get the current id in the URL (#something) kinda like CSS3 :target

    Hello, Well, I think the title sums it up, but here it is: (optional scenario, just skip this part if you just want me to get to the point of the question): for one of my classes, I have to make a website for a non-profit organization. I have a three-level menu: Section 1 > Page 1 > Subsection 1 - 2 -3... etc. The way it's organized is "sections" are tabs, "pages" are buttons and "subsections" are accordion items, basically. I want to be able to access the accordion items using the url, because my
  • Datepicker update multiple alternate fields??

    Hi, I like to alternate multiple fields with differ formats. I like to update a hidden textfield with another date format. In total i have 3 date fields (ie dayname, user friendly format and php friendly format)  arrival.datepicker({altField:'#arrivalDay', altFormat:'DD', buttonImage: 'imgs/calendar.png', buttonImageOnly: true, constrainInput: true, dateFormat: 'dd MM yy', duration: 'fast', firstDay: 1, maxDate: '+5Y', minDate: '-0D', prevText: 'Earlier', showButtonPanel: true, showOn: 'button',onClose:
  • jquery keypad

    I am trying to design a web page with multiple input fields to use the keypad, but I also want the prompt to change with each field
  • 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