• add and remove bullet from list items

    I am working on a vertical menu that has main links with sub links. The sub links appear when you click on the main links (its parent link). I have an image that I'm using in place of the standard bullet that appears just fine when I click around on the various main links. The problem is the main links needs to have the bullet present when someone lands on them or their sub links. Can someone help me out? Here is my code:         <ul class="menu">             <li class="item1"><a href="page.html">Products</a> 
  • selectbox add or remove input in jquery

    Hi i have two selectboxes 1 st selectbox = adultid 2 nd selectbox  = childid if i select 1 in adultid , i want to show 2 options in childid then when i select 2 in adultid , i want to show 4 options in childid the above is simple and done.. then  if i select  1 in childid , i show input box, then if 2 selected in childid, i show 1 more input box if 1st input box included already else show 2 input boxes ... same for chilid selected 3 or 4.. but  if i have childid  selected as 4  , then i select childid
  • dataTables Select Row Issue

    I have the following html for a table...                         <table id="timesheet" class="inner" border="0" cellspacing="0" cellpadding="0" width="100%">                             <thead>                                 <tr>                                     <th class="udatal" width="33%">Project-Name</th>                                     <th class="udatal" width="25%">Phase-Description</th>                                     <th class="udatar" width="05%">Mon</th>                    
  • accordion

    Hi, I've installed the entire jQuery-ui-1.10.4-custom code that I created from http://jqueryui.com/themeroller/ and am trying to implement the custom themes. I have no idea as to how. So far I created a basic accordion and don't know what pieces of code I need to edit and change so as to access the custom themes I installed on my host server. Here's what I have on the page so far: <head> <meta charset="utf-8"> <title>jQuery UI Accordion - Default functionality</title> <link rel="stylesheet" href="//code.jquery.com/ui/1.10.4/themes/smoothness/jquery-ui.css">
  • How do I load a text file?

    Is it possible to load a text file (already on my server) into an array? The text file simply is a list of Holiday dates. I don't want to hardcode the dates into the .js file as it will need to be updated every few years. So what I'd like to do is to load the list of dates from the text file ONCE when the user displays the webpage initially into an array in order to have the code work on those dates. Can do? Thanks.
  • calculation works in console but does not render in table cell

    Hello, I have a calculation that works in the console. I want to render the same data into a table cell using jQuery. The data calculated comes from a json file and runs through a loop and works fine. I want to capture the sum of three table cells for each table row and write the total sum to a fourth cell on the same row. This works fine in the console and gives me the values that I want. Only the last item in the array prints to all of the target cells. table has 10 rows of data. The issue is in
  • questions on Sortable widget

    I am having an issue with the sortable widget not working properly after I programmaticllay set a drop position for one of the sortable elements (a line item in this example).   The working sample is below and would probably be much easier to understand my issue if you try it yourself.    All it does is create 3 colums. The 9 line items are dynamically created in the left column. After Item5 is created, it is moved to the 3rd column "sortable3" using the .offset method.   Once all of the items are
  • help::jquery validator error message

    how can i display the error messages onto onblur Event(jquery validator) pls.  help....
  • Json : My code is not working

    Dear All  I  always fail using this JSON My JQUERY <script language="javascript"> $(document).ready(function($) { $("#loginid").blur(function() { if($.trim($("#loginid").val())  =='' ) {     $("#loginid").val('');     alert("login id cannot be blank"); } else {   var lid=$.trim($("#loginid").val());     if(lid.indexOf('@') === -1) // check whether the email id has @ sign ==> works fine       {            alert("Enter email ID only");       }       else       {         var lid=$("#loginid").val();
  • JQuery Roundabout in Different heights what can I do?

    <textarea class="goog-textarea" style="-moz-box-sizing: border-box; overflow-y: hidden; overflow-x: auto; padding-right: 20px;" id="source" name="text" wrap="SOFT" tabindex="0" dir="ltr" spellcheck="false" autocomplete="off"> </textarea> <div id="gt-src-tools">    <div id="gt-src-tools-l">       <div style="display: inline-block;" id="gt-input-tool">          <div id="itamenu">             <span class="ita-kd-inputtools-div">             </span>          </div>       </div>    </div> </div> In JQuery
  • Making form changes react by invoking a jquery method after 100 ms

    Hi I have a form with a lot of elements. Checkboxes,sliders and radiobuttons. I am looking for a technique to make the form react 100 ms after a change on these elements. Having them to call a Jquery method. The JQuery method will make an AJAX call to my backend. The AJAX call is covered and as starters I simply want a jquery method to alert('something') after 100 ms of a form field change. Can someone please direct me in the right direction on achieving this? I would really appreciate your time.
  • Adding Step to Custom jQuery Spinner

    Can you please take a look at This Demo and let me know How I can add step to code to increment the value every time by adding 10 to the existing until getting to 100? and decrements the value until zero? As I said i need to have a step on 10 number. <div class="btn-group input-group">     <button type="button" class="btn btn-default minus">-</button>     <button type="button" class="btn btn-default opacity">% 0&nbsp;&nbsp;</button>     <button type="button" class="btn btn-default plus">+</button>
  • Prepend or append value in the attribute value

    Say I want to alter the existing value of an attribute. To change this: <img src="images/bla.png" alt="" />Into this: <img src="images/new_bla.png" alt="" />How can I get this working with jQuery? So I don't want to change the whole value of the src attribute, but just prepend a new value inside it. Anyone?
  • JQM Database Foreground/Background

    Hi, is it possible when using JQM to do the following. On the launch of my JQM app it calls a function to create a HTML5 Database if one isn't detected.  What code would I use to ensure this is checked each time the app is active. For example if the user were to place the app in the background and then delete all browsing data/history etc, and then brings my app back into the foreground what code would I run so that I could check the DB was still there - as in the example I have just mentioned it
  • Ajax

    Hi, I work Ajax (php , jquery) and I have Interval in jquery to reload my records from data base and every record has onclick event in jquery when the records reload onclick doesnt work on them I choice a way which after reload it loads onclick script again but it makes lag in browser. Is there other way batter than it? thank you so much...
  • How to resolve this css bug in Mac / Chrome & Safari

    bug Found in Mac / Chrome & Safari  Bug:  Highlighting of text is aligned top in all fields. It should be aligned bottom. please refer my attachment My jsfiddle: http://jsfiddle.net/6q66R/4/
  • Problems with event

    I have a little problem with a code like this $("#my_div").on("mouseenter","#inside_div",show_result); function show_result(event) { console.log(event.type); $.get("result.php").then(function(data) { console.log(event.type); $("#inside_div").text(data);}); } The problem is relative to event.type, with the first console.log i get event.type=mouseenter, but with the second console.log i get event.type=mouseover... why this?
  • can you see what is wrong with this code

    can you see what is wrong with this code ? I have a form with 2  input text boxes and 2 submit buttons, when the user clicks the second button , it should list all the months starting with letter "J", <!doctype html> <html lang="en"> <head> <meta charset="utf-8"> <title>submit demo</title> <style> p { margin: 0; color: blue; } div,p { margin-left: 10px; } span { color: red; } </style> <script src="//code.jquery.com/jquery-1.10.2.js"></script> </head> <body> <p>Type 'correct' to validate.</p> <form
  • HTML rows not being created

    Does anyone see why the rows aren't being created in the else statement?  When the list name changes a new table is created and the first row is added properly but when it is looping through the items in the list the additional rows are not being created.  FYI, I did debug this and it is going into the else statement and looping through the items but nothing gets rendered to the page.  Code sample below.......   if(listName!=newListName) { newListName = listName; liHtml = listName + "<br><table><tr><td>File
  • jQuery 2.1.0 | Youtube API 3 - Get uploaded channel videos

    Migrating from Youtube API v2 to v3 is a genuine pain in the ass! In v3 there is more code to write in order to filter what you need to get. The worst of the bunch is attempting to access all videos that exist in a Youtube channel. Youtube API v3 recycles the code term "Playlist" to mean Playlist content AND Channel content, that itself is needlessly confusing, unlike v2 where everything coded was clearcut and intelligent. Anyhow, I couldn't find practical sample on how to get the data needed to
  • How to Change Event on Radio Group Button???????

    I have a problem in changing the event of a radio button. I have 2 radio groups namely,radio_visualize1 and radio_dept. radio_visualize1 have 3 buttons namely date2,semester,and year.AND radio_dept yes ,no. <p id="unbold1">Visualize by:         <label><input type="radio" name="radio_visualize1" value="date2" id="date2">Date</label>          <label><input type="radio" name="radio_visualize1" value="semester" id="semester">Semester</label>         <label><input type="radio" name="radio_visualize1"
  • Contextmenu in html and not js?

    I found this awesome tutorial: http://www.onextrapixel.com/examples/akismet-press/ The only problem is, that the content that is displayed in the contextmenu is in the js function: var logos = '<h2>Looking for our Logo?<span class="close">X</span></h2>'; logos += '<img src="images/oxp-logo.png" alt="Logo Download" />'; logos += '<ul><li><a href="images/oxp-logo.png" rel="external">High Res<span>300 Kb</span></a></li>'; logos += '<li><a href="images/oxp-logo.png" rel="external">Low Res<span>150 Kb</span></a></li></ul>';
  • ThemeRoller default Icon

    Hello everyone, I was using the ThemeRoller to aid in the customization of a jQuery mobile theme, but changing the “Default Icon” to black doesn't seem to do anything, while everything else works (for example removing the circle). I have tried with both Chrome and Firefox, and the console doesn't give any javascript errors anyways. I know I can have black icons by adding the .ui-alt-icon class, but it's a hassle to do it on every element, and it is especially an hassle if I want to have the default
  • How to read jquery nodes dynamically at run time

    How to read jquery nodes dynamically at run time how to read a json file from jquery using $.get method when the nodes are only known at run time suppose the user browseing the link www.abc.com?operation='insert' www.abc.com?operation='delete' ex json file  {"insert":"You have insert link ","delete":" you are on  delete link "} I wants to load the respective message i read the url succss full using jquery but how to handle json $(document).ready(function () {     $.getJSON('/persistent/Json/homepage.json',
  • .val(variable) Not setting a value

    Hi there,  I'm fighting with this piece of code. I get result back from a PHP call and data does infact get populated. Alerting out setName show the correct value, but the next line (7) doesn't work.  Any ideas? function(data)         {             var images = data;             var setName = images['set'][0].name;             alert(setName);             $('set-name').val(setName);         });
  • Datepicker Header Buttons

    Hello! I'm trying to make a datepicker for Firefox and for some reason, two buttons display instead of one for the Previous/Next month arrows, which makes all four arrows (left/up and right/down) appear instead of just left and right. I've attached a screenshot to illustrate what I mean. How do I remove the extra buttons? I can't figure out how to fix this. Thank you for your help!
  • Map isn't showing with JQuery Mobile

    I'm building an app with JQuery Mobile that will be submitted to Phone Gap. Right now everything works but the map doesn't show up. You can see the working example here: http://phoenix.sheridanc.on.ca/~bdes1612/DS_P2/swipe_test8.html  Swipe the lefthand side and click dinning. The selectors are there but no map. and it works outside of query mobile: http://phoenix.sheridanc.on.ca/~bdes1612/DS_P2/plgeotestcolour2.html I'm really new at this and part of my problem is I'm not sure where to put certain
  • Need help attaching external jquery ui library

    Hello i'm new to jquery after learning html and css. Can anyone tell me if i'm doing anything wrong? It's not working.  Thank you. <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=920" /> <title>Swift</title> <link rel="stylesheet" type="text/css" href="Index.css"> <link rel="stylesheet" href="css/ui-lightness/jquery-ui-1.10.4.custom.css" /> <script src="/Users/Am/Desktop/Swift.Files/js/jquery-ui-1.10.4.custom.js"></script> <script src="/Users/Am/Desktop/Swift.Files/js/jquery-1.10.2.js"></script>
  • Add ajax response (html with content) to DOM

    I am trying to set up an instant search. I have the ajax call setup. The response is a json string containing the HTML of the searchresults. My question now is, how can I add this to the DOM? The html is an full table with content. What I do at the moment is this:  if (results.errcode == 200) { $('div#vrijwilligers').add(results.content); }
  • script that services multiple input fields

    Hello, I have several input fields that only allow Alphabets & no space. I also have the code below which services that need but would have to copy / past the code for each individual field for it to work. is there a better way to use the code below and have selected input fields reference the same code?  $(function() { $('input[name="fname"]').bind('keypress', function (event) { var regex = new RegExp("^[a-zA-Z]+$"); var key = String.fromCharCode (!event.charCode ? event.which : event.charCode);
  • first try with buttons

    i have a simple code , where a user can check if a button has redcolor by clicking on one of the buttons, but for some reason the code wont run.  <html> <head> <script type="text/javascript"> //<![CDATA[ try{if (!window.CloudFlare) {var CloudFlare=[{verbose:0,p:0,byc:0,owlid:"cf",bag2:1,mirage2:{profile:false},oracle:0,paths:{cloudflare:"/cdn-cgi/nexp/dok8v=02fcfa4f56/"},atok:"44278e6492cdf14e3f8920715f3f1b2c",petok:"816ebc377b160c3227ae70531c1d55ae7b8484a3-1394234930-86400",zone:"mkyong.com",rocket:"0",apps:0}];var
  • jQuery onchange event not firing when input value changed by another function is zero or blank

    The following code calculates the specified percentage of a number in two textboxes. And displays the sum of those percentages in an output tag. It all works fine except if the percentage of any number is 0. Example: Textbox1: 4% of 200 = 8 Textbox1: 15% of 300 = 45 Output tag = 53 But if I change the 4 to 0: 0% of 200 = 0 displays correctly. But the output tag does not change from 53 to 45. This happens only if % textbox is changed to 0. If I change it to say 11 as: 11% of 200 = 22, the output tag
  • click in .html

    Hi, i'm trying to replace text after click. First time it's ok, but then i want to replace again, and then it doesnt work. <span class="replace"><button>Click here</button></span> $('.replace').html("<span class='change'><button>Change</button></span>"); Now it doesnt respond to: $('.change').html("Replaced again"); What can i do?
  • Sortable question (creating a drag event)

    Using the "Sortable" widget, is it possible to create a function that would mimmick the drag and drop behavior of an element?   To elaborate, instead of using my mouse to click on one of the items and then dragging it to another position, I want a function that will take the item and move it automatically without my intervention, BUT I still want the sortable behavior to still work properly.   Any ideas?
  • slider

    I'm trying to create a slider that automatically changes images or if you click on a number button then it changes to that slide, the slider also needs to be able to slide automatically on a touch device but if you touch the slider it stops and you can the swipe left or right for the image. I have tried various plugins but none of them seemed to do what I would like
  • flexslider

    I'm using Flexslider over fancybox. What I want is on closing fancybox flexislider get reinitialize. Right now its behaviour is, I have opened the slider, and on 2nd slide I'm closing a fancybox popup, when I again open slider it starts with 2nd slide not with the 0th slide. I tried destroying a flexi slide methods but didn't work. suggest some solution.
  • onclick event collection

    Can I get a collection of all onclick events attached to a specific link?
  • jquery json data not populating table cells

    Hello - I'm calling a remote json file to populate a table and the table and data is not rendering on the html page. I'm not getting any js errors. html:   <table id="content"></table> $(document).ready(function(){ $.getJSON( "https://xx.xxx.com/xxx.medals/medals.json", function( data ) { var stats = [ ]; //console.log(stats); $.each( data, function( key, val ) {    stats.push('<tr><td class="one">' + key + '</td>' + '<td id="flag"><div class="flag">' + val.id + '</div></td>' + '<td class="cnt">'
  • which is the best book to become expert in jquery?

    as i am in beginner to intermediate level...pls suggest me a good book thanks
  • jQuery sortable animation doesn't work properly if you have to scroll down

    Hi, I have a set of sortable elements with the "revert" option set to true in order to animate the transition. The problem comes when the element is below the document offset (making you scroll down). The animation doesn't work properly as you can see in this fiddle. http://jsfiddle.net/LLYkn/4/ I wonder if this has something to do with this bug here: https://forum.jquery.com/topic/jquery-draggable-bug-wrong-offset I've been trying to fix it by removing the top margin when the animation begins without
  • 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