• Changing HTML content using jQuery

    I need to change this HTML: <div class="wp-pagenavi">     <ul>         <li class="active"> <span>1</span> </li>         <li> <a rel="start" data-ci-pagination-page="10" href="http://devserver/index.php/blog/page/10">2</a>         </li> <li class="next"> <a rel="next" data-ci-pagination-page="10" href="http://devserver/index.php/blog/page/10">→</a></li>     </ul> </div> To this one:     <span class="current">1</span>     <a href="#" class="page">2</a>     <a href="#" class="page">3</a>     <a href="#"
  • Theming a input's focus:invalid CSS

    I would like to apply a theme's ui-state-error class to a input's CSS focus:invalid property. I have tried: $("input:focus:invalid").addClass("ui-state-error"); ... but this has not worked and failed with: unrecognized expression: unsupported pseudo: invalid Is there a way to theme an input's input:focus:invalid pseudo class with ui-state-error?
  • Make Phonegap/jquery mobile work across all Android devices

    I'm seeing diff errors across diff devices and OS for Android. I found this Phonegap blog post from 2010, that somewhat talks about this issue but is confusing to me, http://phonegap.com/2010/05/31/using-phonegap-across-all-android-devices/ ...should you target the latest all the time, even when making a specific apk to test on your specific device?
  • New to jQuery and Have a Problem

    I'm working on reviving a project and currently the project uses jQuery 1.6.2 and works fine with it however as part of the revival, it needs to be upgraded so we can take advantage of newer technologies, etc. When I replace jQuery 1.6.2 with 1.9.1, the script fails to load any data and returns this error in Firebug Error: Syntax error, unrecognized expression: a[href="#home"], On the HTML page, I have this code currently: jQuery(document).ready(function() { function request(page) { jQuery('#content').html('<h2
  • How do I add controls to slideshow?

    Hi, I'm trying to redesign the homepage of our website and have set up a duplicate homepage to test on which you can view here: http://baseballsoftballuk.com/homepagetestfortconly/ The slideshow is already there, I believe using JQuery Cycle but I want to add buttons so you can jump to a slide rather than have to wait for it to come around again.  I've seen the 'pager' option here: http://jquery.malsup.com/cycle/pager.html and I'd like to add something similar to our slideshow but I can figure out
  • jQuery Regular Expression

    So I wrote a custom method that restricts the username to specific alphanumeric characters and special characters. Everything works as intended except I want to make sure the username starts with a letter. Here is my code jQuery.validator.addMethod(           "RestrictSpecialCharacters",           function(value,element){             var hNum= /[^a-zA-Z0-9._]/;             var inp=jQuery.trim(element.value).toLowerCase();                         if(hNum.test(inp)) {                    return false;
  • Canvas auto wrap

    Does jQuery had a power to make the HTML5 canvas auto wrap? I'm having a problem on computing on when to move the text on the new line. So I am thinking of other way to do this. I want the text on the canvas to act like what a normal text element do on its content. Thanks! . .
  • Validation not working IE8

    http://www.aquariumbids.com/Account/Register.aspx jQuery validation is working in Firefox but not in IE8. I am using the following javascripts: jquery-1.9.1.js jquery-1.9.1.min.js jquery.validate.js Now again, this is working perfectly in Firefox. Let me know if anyone wants me to post my code here. You should be able to see everything you need since I supplied my development link above. Any help in this matter would be greatly appreciated. Thanks
  • Problems with headings within LI sections

    Hi all, I have chosen to "inset" most of my content using the data-inset="true" attribute to allow my background to show through, rightly or wrongly. This is generally applied to a <ul> tag, meaning that all content should be within <li> tags. It seems that when I add heading tags (h1, h2, h3, etc) they are all formatted exactly the same, rather than accepting the browser default styles. This appears to be because they are all given a class of ui-li-heading, which is subsequently styled by the JQM
  • adjust jQuery speed & easing

    Please see URL: http://backstageweb.net/newsite and click a few of the nav buttons. Note the speed and easing. Now see http://www.demo.pagescroller.com/ and note its speed and easing (faster with more pronounced easing). This is the effect I'd like. Pagescroller.com is where I got this plugin code (I bought the Pro edition). However, when I look at the source code for their page, I see this:                $('#wrapper').pageScroller({                        navigation: navLabel,                       
  • Suggestion for UI

    Allow functions on options: For example length,  width, title etc ...  title: $("#button").attr("title"),  
  • rss

    Hello, I am wondering why getJSOn url is not working? $(document).ready(function () {     test = $.getJSON("http://rss.zoover.nl/accomodationfeed.ashx?id=172221", function(data) {        console.log(test);     }); }); If I put this url directley in my browser is is giving me a lot of info: http://rss.zoover.nl/accomodationfeed.ashx?id=172221 Can somebody point me in the correct direction?
  • Load Table 10 rows each on a button or any thing

    Hi, I am populating an HTMLTable using C# code in my Asp.Net application. On products I am successfully showing all the products on a page. Problem is I want to show only 10 products, then after that a button would appear and clicking on it, it should show 10 more rows and so on ... Please guide me in this regard Usman Waheed
  • Form post and Browser Refresh

    Hello All, I am having issue in form method post and browser refresh. Whenever I am using post method, once submitted and if you refresh the page I am losing my post data. Is there any work around for this? you can identify issue in following example link. http://jquerymobile.com/test/docs/forms/forms-sample-selfsubmit.php fill up the form, it will display information once you refresh your posted data get lost.
  • jQuery Mobile: use a dialog to let user confirm form submission

    I would like to use the beautiful jQuery Mobile dialog: <a href="foo.html" data-rel="dialog">Open dialog</a> To ask a user if he really wants to submit a form. My idea is: user fills the form then clicks on submit and so he sees a dialog like "do you really want to submit the form? Yes/No" and if yes the form is sent using ajax to my insert.php page if no the dialog is simply closed. I've read in the official documentation and it looks like this is simply a graphical tweak to show any #page of my
  • animate({left: -50%}, 'fast') Is this possible?

    I'm trying to move a container out of sight by moving it 50% to the left. the container has a width of 50%. 50% is important because the site is flexible. example: <div id="cont" style="overflow:hidden; white-space:nowrap; width:100%"> <div id="cell_cont" style="display:inline-block; width: 50%"> <div id="cell" style="white-space:nowrap">something meaningful</div> <div id="cell" style="white-space:nowrap">something meaningful</div> <div id="cell" style="white-space:nowrap">something meaningful</div>
  • jquery.selectbox-0.5_style_2.js and javascript function issue

    I am using - jquery.selectbox-0.5_style_2.js, to style my combo boxes. when i load this like this <script type="text/javascript"> $(document).ready(function() {     $('.styledselect_form_1').selectbox({ inputClass: "styledselect_form_1" });     $('.styledselect_form_2').selectbox({ inputClass: "styledselect_form_2" }); }); </script> I am getting the style properly. There is no problem on that. But javascript functions are not working on those comboxes. Example <script type="text/javascript">    
  • Uncaught Error: cannot call methods on button prior to initialization; attempted to call method 'widget'

    I have this ERROR while I am migrating from old version of jQuery to jQuery 1.9.1. How do I solve this problem. Is there any solution for this problem?
  • jQuery on and off for module instance

    Hello, Firstly I want to apologize for my poor English. I'm facing a problem. I have a Single page application build with modules (With RequireJS). I can have more instances of the same module in the page at the same time. I try to manage events handlers for the module instance but I'm unable to use $.on and $.off for the current instance of my module. Please find follow code to demonstrate my issue define([     "jQuery" ], function($) {     /**      * Constructor      */     function myModule(){
  • jQuery Mobile radio buttons not working in ios?

    I'm working on phonegap thing using jquery mobile controls for both android and ios. Only the radio buttons,flip buttons and select items are not working in ios and working fine in android. I'm using them in <ul>,<li> tags. Is there any problem if i use them in those tags? Example code im giving below:.   <ul data-role="listview" data-inset="true"> <li> <fieldset data-role="controlgroup" data-type="horizontal" data-mini="true"> <legend>CC Me To EMail:</legend> <input type="radio" name="radio-CCMail"
  • Dialog box close after click is made

    hi guys,... can anyone help please,....  I have a dialog box open to set photo as profile avatar picture,... how can I close dialog box after click is made? thanks in advance,...  <script type="text/javascript"> $(document).ready(function() { $('#profile_picture_dialog_<?php echo $profile['User']['id'] ?> a').each(function() { var $link = $(this); var $dialog = $('<div></div>') .load($link.attr('href')) .dialog({ autoOpen: false, width: 500, modal: true, title: 'Set Profile Picture' }); $link.click(function()
  • Jquery find Char length and set width based on it

    Hey, I'm having a problem getting this to work: $('#itemListLeading table tr :nth-child(2)').each(function(){   $length = $(this).children().text().length;      console.log($length); }): I want to find each of the 2nd table data's character length and eventually assign a width based on the largest one, but I seem to be getting errors with the first line and I don't know why. I have tested it without the each function and I'm able to return the full length of all the table datas but I want to be able
  • jquery mobile: custom back button

    Hi all, I have the following situation. Inside one page I load dynamic content via web services. Something like: 1st level => Sports list  desc: (when user clicks on specific sport) then I load all states 2nd level => States list desc: (when user clicks on specific state) then I load all leagues 3rd level => Leagues list etc...... So I am able to do custom "back button" in a form normal jquery mobile button <a date-role="button">Back</a>, then I dynamic change onclick attr to put function name which
  • Seperate in Listview

    there is a part of my XML response that I need to put in different list view with number.  this is the response <Note> Cook pasta according to directions, chill in ice water, drain.¶Blanch broccoli in boiling water, chill in ice water, drain.¶Use ½ soy sauce to season the chicken, heat oil in no stick pan, brown chicken, and reduce heat and finish cooking.¶Don"t overcook! Slice chicken into 1" strips, turn and cut into ¼" pieces, place into bowl with other ingredients except dressing and soy sauce.¶Mix
  • Using Ajax To POST Something

    hi , this is my first time to asking a question in this website . i have an ajax post method Like the below code  $.ajax({type:"POST",url:"functions.php",data:{"Showdata":"showdatatouser"},success:function(data){ $('#datagridview').html(data); }}); as you can see im just posting somthing to functions.php into the functions.php we have couple lines of code , that's return for me a Table content with couple Links in the top of that Table . after that i just defined an event  for that links at the top
  • Basic Autocomplete (1.10.2) fails with IE7 and IE8 test VM's

    hi, I'm using some VM's from MS (running virtual box host) to test IE7 and IE8 with jQuery Autocomplete.  In both versions I get the same javascript error: 'label' is not null or not an object.  Line 7143 of jquery-ui.js. Code below.  Would really appreciate it if anyone can shed some light into this. Thanks! Tskeej <head> <script type="text/javascript" src="http://code.jquery.com/ui/1.10.2/jquery-ui.js"></script> <link rel="stylesheet" href="http://code.jquery.com/ui/1.10.2/themes/smoothness/jquery-ui.css"
  • Could someone please step me through how to make it work please :: Lightbox 2

    I don't know how to code. I do know css/html. I do want a photo viewer and LB2 is perfect for me bit I don't know how to make it work and I have tried very hard. <http://lokeshdhakar.com/projects/lightbox2/> I've followed the steps by placing the code in a html blank page. However,  I'm missing something and it might be this part: lightbox.js will add listeners to elements with attribute rel="lightbox" and once you click it it shows images in popup, from link's href attribute. I Do not understand
  • How to embed youtube channel in jquery mobile page?

    Hi all, I'm trying to insert or embed a youtube channel in my web app created using jquery mobile 1.3.1. But I haven't found any script suitable for JQM. I only find Jquery scripts that partially work with my web app. All I would like to do is to show my youtube channel and play a movie without leaving the web app. Something that will play the movie in a sort of lightbox would be enough. But all script I've tested have hardcoded links to youtube channel, not allowing me to add the class required
  • jQuery Gmap plugin [Error: has no method 'gmap' ]

    Hello  I added the jQuery google map plugin but i got this error :  Uncaught TypeError: Object [object Object] has no method 'gmap' My html : <!DOCTYPE HTML> <html> <head> <script>window.$ = window.jQuery = WLJQ;</script> <title>test_geo</title> <script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=true"></script> <script src="js/jquery.js"></script> <script src="js/jquery.ui.map.js"></script> <script type="text/javascript"> $(document).ready(function() {     $('#map').gmap().bind('init',
  • jQuery Validate plugin with metadata broken after upgrade to jQuery 2.0.0

    I successfully used jQuery Validate plugin with metadata (this one at http://bassistance.de/jquery-plugins/jquery-plugin-validation/ ). versions: - validate 1.9 - metadata  * Revision: $Id: jquery.metadata.js 4187 2007-12-16 17:15:27Z joern.zaefferer - jquery 1.7.2 I now upgraded jQuery to 2.0.0, validate to 1.11.1, can't find metadata anymore (404 here: https://github.com/jquery/jquery-metadata ) Part of my form: <input id="email_big" name="email" type="text" class="span4 {validate:{required:true,
  • Accordian Icon on the right to delete the accordian.

    Hi all, I have a site that allow the user to select a date and add these selections in the form of an accordian so that they can see the etc info.  All works great all I need now is to add an icon to the <h3> that will be on the right and when this is clicked the accodian entry (<h3> and <div>) are deleted. Any help would be great. Cliff.
  • Binding events in a plugin

    I'm trying to write a jQuery Websocket wrapper. I realise there are a couple out there, but I am using this as a means to learn how to write jQuery plugins. I have nothing websocketty written yet, I'm having a more fundamental issue. My code, thus far, is as follows (function($){     var methods = {         init:function(options)         {             console.log("Innited ");             return this.each(function()                 {                                     }             );         },
  • Datepicker onSelect not firing by setDate

    Hi, Quick demo - http://jsfiddle.net/ZgcVK/ - the onSelect function works great but doesn't seem to be fired by setDate. Ideally, when the page loads, populate the "results" DIV as if the user selected a date from datepicker popup. Wondering if this is still a "bug" - http://bugs.jqueryui.com/ticket/6264 - has this been fixed in 1.9.1 or has the temporary fix been rolled back due to side effects? I am using jQuery 1.9.1 with jQueryUI 1.10.1 Many thanks
  • MultiLanguage

    I have this Popup to change the Language of my apps. Do you have any codes guys how to change the language of the whole apps? without using the plugins?
  • Top to bottom

    Hi am new, am trying to learn jquery in advance.  Having issue to implement top to bottom. When i open the webpage, everything works properly, just the image which should be appeared in middle or bottom of the page, currently is shown only in the upside.  Below is the code:  <style> #main { float:left; width:500px; background:#c9c; } #sidebar { position: fixed; right:0px; bottom:15px; display:none;/*hid the button first*/ } #sidebar a { text-decoration:none; border:0 none; display:block; width:31px;
  • Loop through table with specific conditions (turning data into an xml string)

    Hey all, I currently have a form with data being displayed via a web service call with JQuery's $.ajax() function which dynamically feeds the values into input fields into the form and creates table data too. I would like to retrieve the data from this form and put it into an XML string to send back to the web service. Currently my code to retrieve the data from the input fields look's like this: var cb = document.getElementById('paymentList'); var selected_cb = cb.options[cb.selectedIndex].text;
  • Datepicker automatic calendar display

    Hello, It is possible to display datepicker's calendar automaticly when pressing tab on previous text field? I mean, when I'm positioned over a text field, if I press tab to jump to datepicker's text field, I want it to instantly display my calendar, it's also configured to display the calendar button. This is my config.: $( "#datePicker" ).datepicker({  showOn: "button", buttonImage: "date.gif", buttonImageOnly: true, dateFormat: 'ddMy',  numberOfMonths: 2, minDate: "0D" }); Thanks.
  • Jar filling up...

    I need a javascript functionality where when a jar fills as the user adds items to it. An example will be like a user is budgeting for the month and each time she adds say £100 , the jar fills up. Is there anything out there I can use. Long shot .. Thanks a great deal
  • Open Dialog From Within Accordion

    I want to open a dialog from within an accordion The data for the accordion comes from mySQL database But whenever I try it the dialog (which also will pull in external data) seems to mess up the accordion layout. I use a for loop in php to cycle thru the company IDs and set up accordion section for each (bkos of sensitive information I cannot post here but the loop and data import parts are working good) this is totally a layout problem that I have spent hours trying to figure out  and just can't....
  • Filter Tables with input

    Hi,  I'm trying to write a function to filter a table by entering a tag into an input. (like FooTable) But somehow i can just filter the last column. (JsBin document) I have no clue how to get to the other columns. Thanks for your help,       Internerd
  • 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