• Get JSON data from a distant PHP server

    I'm using jQuery-1.9 and i would like to get json data from a distant PHP server. I've tried with JSONP, but i didn't succed. If anyone can help me with a working solution by just creating a json file, and an html file using Javascript to get the json's content. It will be great! file.json must have an access via an url. file.html can be anywhere (desktop for example). Need your help guys !
  • Changing tabs by removing and adding class 'active'

    Given the text "webmaster", how do I remove the class from the currently active tab (in this case, organization) and add the active class to "webmaster" for the listitem and its corresponding div below? Not sure if step 1 and 3 are correct, but I'm not sure how to do step 2. // Step 1: Remove all active classes because only the href and its corresponding div should have an active class. $('.nav-tabs li').removeClass('active'); // Step 2: Next step needs to be add the active class to the li that has
  • Sorting Table including rows having display property set to none

    Hi all,        I am new to Jquery and some how managed to use Tablesorter to enable sorting table in my html page. The problem now im facing is that i want to display only top n results based on the metrics and need to hide the other rows of the table. But when i sort the sorter takes only the rows that are visible (I use style=display:none to hide rows greater than n). I want the sorter function to consider all the rows for sorting
  • Problem with fin() and each()

    The code will: 1. Gets the current url 2. Find the current url in xml3. Returns a new url and redirects to it  What's is the error? $(document).ready(function () { $("#leerxml").click(function () { var urlactual = document.location.href; $.get("students.xml", {}, function (xml) { $(xml).find("urldirige").each(function () { if ($(this).find("url").text() == urlactual) { //do something document.location.href = $(this).find("reserva").text(); } }); }); }); });
  • jQuery Cascading drop down issue on dynamic table row

    Hi Guys, This is regarding an issue related to the dynamic html table row controls, binded events. I have a 2x2 html table (which will be n x 25), where we do have cascading drop downs. I have succesfully implemented the cascading dropdown there. But, the problem coming is while I am adding new rows to the table dynamically, the cascading drop downs are not working any more, on child rows. But, it's working properly on the top row. The code is as below - HTML - <table style="border:1" id="tblForm">
  • jQuery UI Tabs 1.10 - Off-Left hiding of charts and maps

    Hi all, I tried posting in the Using jQuery UI section but got no response, so 'll try posting here as well. I have used the off-left approach on the ui-tabs-hide class to get all my chart and maps which are placed in hidden tabs to display correctly. This seems to have been a widely used work-around for a particularily annoying problem. Since jQuery UI 1.9 the ui-tabs-hide class has been removed and replaced by the hide() method. Not surprisingly all my charts and maps are now being displayed incorrectly.
  • JQuery having a negative domnino effect?

    Good day all; I'm having a problem regarding the "type-writing effect" (http://jsfiddle.net/pSUk6/6/). Once I inserted it into my site it seemed to bare an effect on my "back to top script" (http://www.myjqueryplugins.com/jquery-plugin/backtotop) and "spry validation textarea". The spry validation comes courtesy of Dreamweaver CS6. Should I proceed and post all code here? Anyhow what happens is that the "back to top" button shrivels in a round mole like circle and the spry validation text area dissapears
  • How to determine print media in jQuery - not CSS

    I have code that inserts some HTML code and then displays it, if appropriate. It's something like: $(document).ready(function() { $('#foo).prepend('<div class="bar" ......</div><div class="baz" ...</div>'); /* I need a test here to determine whether media is print so that I can skip the following line of code. */ $('.bar').css('display,'block'); }); The default for class .bar is "display:none"; I have a CSS file for print but because I change the display by javascript (jQuery) it doesn't work in
  • works in FireFox, Chrome but not in IE7 or 10

    Hello everybody, totally lost why this simple script wont work in IE 7 ro in IE10, any help you can provide would be greatly appreciated. <!DOCTYPE> <html>     <head>         <meta http-equiv="Content-Type" content="text/html; charset=utf-8">         <script src="http://code.jquery.com/jquery-latest.js"></script>                  <script>             $(document).ready(function() {                 $('#btn_click').on('click', function() {                     var url = 'testingv2.php';                
  • How to work with ajax events?

    Here's the reference documentation that I've been following: http://api.jquery.com/Ajax_Events/ and http://api.jquery.com/ajaxSuccess/ The first link indicates that I can bind through "jQuery.on()" any DOM element to handle an ajax event. The second link indicates that this is invalid since 1.8. As a newbie to jQuery... how do I handle an ajax event other than just binding to jQuery(document)?
  • Floating dots ( each as menu elements)

    Hi I want to make a JS menu which is in the shape of a web-og-dots . each dots are one element connected to every other dot . the connection is depends on a relationship . For exam : father (age,hobby..etc) ---- friend (age,hobby..etc)   |  |   |  |    |  wife (...) son (age,fav color ..etc) can some suggest any easy way to doit using framework? -Raj
  • How to get the image icons in the listview dynamically using jquery ?

    Hi,i'm trying to get the images as icons in the listview dynamically in the home page. My code: http://jsfiddle.net/EpTeL/1/ I have 3 image icons like 0sel.png, 1sel.png, 2sel.png in the "icons folder".How can i get this icons in listview dynamically using jquery.Can anyone help me. i tried as:     $("#section_list").append('<li><a href="#chapter" id="' + order + '"><img src="icons/' + url + '" id="image"     alt="Picture"/>' + section + '  </a> </li>'); $list.find('li').find('img:eq(0)').addClass("ui-li-thumb").each(function()
  • Phonegap & JQM support for Blackberry 9360 v7.1

    My application perfectly works on other platforms and Blackberry 9900, and also emulators including Blackberry 9360. But when it comes to this particular device, some icons are not clickable, radio buttons does not change on click, etc. It behaves pretty strange. I was wondering did anyone tested on this device particularly, and is the problem maybe in the WebKit browser support of HTML5 or else? Thank you :)
  • Using Require.js with jQuery

    Hello ,   I have folder called "scripts". And in this folder contains the following files :                   - Require.js .                   - jquery-2.0.0.js                   - Main.js In the "Main.js"  , I write the following code :               require.config({                   paths: {                        "jquery": "scripts/jquery-2.0.0"                     }                  });               require(["jquery"], function ($) {                      $(function () {                    
  • how to Concate folder in js

    here is my js images path url = '/uploads/' + url.replace(/^\/uploads\//, ''); whose path is /uploads/6/9/4/5/6945512/662006_orig.jpg I want to set path /media/945/_7594776.jpg but i don't know about how i set in my js
  • JQuery disabled on smaller screens?

    I have searched and cant find anything relating to jquery behaviour on smaller screens. ON a smaller screen none of my jquery functions seem to work.  It almosts seems like javascript is disabled but bootstrap still works. Please can somebody advise on how jquery works on smaller screens. Thanks in advance.
  • How to go to the next link dynamically using Jquery ?

    Hi, this is my code: http://jsfiddle.net/SP6ww/4/ i want to go to the next link directly by click on the "next" button.For example in my code: when i'm in the "Balmy with perfumes" now when i click on the next button its directly go to the next link as "wear a fine dress" like this upto "Gain a womens heart" in "seduce your partner".like this for parent links. can anyone help me how to do this.. Thanks in Advance.
  • Help With Waiting Screen and Disabling scrolling

    Hello to all, Problem: Creating a waiting screen on click.  So far I have a div that covers all the screen and has an animated gif in the center when clicking. The problem is that if the person scrolls down the div does not cover the entire page. So I would like to add to the following code a function that positions the user on the top of the url and disables scrolling.  Please help i am a newbie (you can see how it works in renta carros) I have this code: </script>     <script type="text/javascript">
  • dynamically generated image problem

      i have six images, but based on conditions, sometimes it shows 3 images, sometimes 2, sometimes 6, sometimes 5. Anyway, I don't know what images are going to be shown. so in JSP, i use jsp to generate images. <img  src="/images/Image-1-aboutusrollover.png"> <img src="/images/Image-2-showme.png"> <img src="/images/Image-3-email.png"> " <img src="/images/Image-4-Test.png"> Here are my problems. For example, the first page has above images. The image 2, 3, 4 will be disabled and enabled 10 seconds
  • How to put a div in other div nd show him when th mouse is in the first or second div

    Basically, i have 2 div  with css(position:absolute) First div is it a 100x100, and second 30x30 The second div is hide and is located in the center of th first div. When the mouse is mouseover de the first div then show the second, and when is leave form first then hide the second div $('#div1').mouseover(function(){    $("#div2").show(); }); $('#div1').mouseout(function(){    $("#div2").hide(); }); it ok, but when i mouve the mouse on the second div then the mouseover property is hide the div and
  • HTML list of 28 items and AJAX page transition problem

    I have a list of about 28 itmes with auto dividers.  The list loads perfects, and I can then click on each list item, and have it load a new page, with phone number and email items...All the pages were copied from an original working page, with nice transitions...the problem is, as I am testing, I have found a bug. If I load all items in order going down the page consecutively, about half way down the page, when I hit the back button to go back to the list...animations just stop working, only when
  • PayPal Example

    Hello, Does anyone have a paypal ajax example? Thank You
  • tools for online purchase solutions compatible with jquery mobile

    has anyone explored the possibilities of implementing online purchase technologies into html+jqm, something which would also remain intact after converting the whole into android and ipad app? pls share 
  • Reg Jqgrid inline edit

    Hi   I have a Jqgrid. I have pencil icon on it and on click of it, it behaves like inline edit. Now I have some message in my controller which I want to pass to client side and want to show on the page. How can I achieve it.   I tried "before processing", "after submit" etc events but the control does not come to load complete, grid complete or above methods. So how is inline edit different.   How tpo show a server message on the page after inline edit. Please suggest.   Thanks & Regards, Usha. 
  • Help understand how exactly parameters work in array example.

    In the example below, the second function takes two parameters, 'elem' and index, I think I understand 'elem'. but how does the function know that 'index' is the arrays index? same with the third example and 'array'... are these keywords javascript recognizes? // native forEach function printElement( elem ) { console.log( elem ); } function printElementAndIndex( elem, index ) { console.log( "Index " + index + ": " + elem ); } function negateElement( elem, index, array ) { array[ index ] = -elem;
  • Problem with AJAX Navigation

    I adapt my website with Jquery mobile. This is a really nice tools, but I have a problem with ajax navigation system. When I load the website from the main url, it's works fine, but if I access to the website from article url and i back to the main url my page is broken (no content). Exemple: Works fine : http://dev.tobefun.net:9600/fr/ViewSwitcher/SwitchView?mobile=true&returnUrl=/fr/ (choose a video and back to the home listbox). Doesn't work : http://dev.tobefun.net:9600/fr/ViewSwitcher/SwitchView?mobile=true&returnUrl=/fr/media/football-goal-of-65-meters  (click
  • submenu hide/show

    Hello, i have a page using submenus http://sxrg-energy.com/pre/ttt/#/SXRG-lemon-lime-mint when i move over "testlink 0 " a submenu is opened. When i leave the submenu it shold closed i now have a hacked solution:) See Code below. But now its opens only on click and close on  click on submenu. And the other  problem ist, i must programm for every submenu this code.  Can someone help me to find a better solution? thank you $("#menu ul li ul a").click(function () { $(".submenu1").css("display","none");
  • autocomplete issues

    I've searched this site, stackoverflow and general web searches looking at different tutorials and I'm still stuck. I have some simple Html: <label for="companyName">Company Name:&nbsp; <input id="autocomplete-companyName" name="companyName" type="text" size="36" maxlength="72" value="" /> </label> JavaScript: (document).ready( function() {       $('#autocomplete-companyName').val('');       $('#autocomplete-companyName').autocomplete({       source:'includes/autoCompleteFunctions.php',       minLength:2
  • data-native-menu="false" and window.location not working

    Hi i have drop down box , im redirecting page on onchange event of dropdown but i noticed it is wokring only IE adn not in FF and chrome.if i remove data-native-menu="false" then it is working fine on all browsers. here is my code:  <asp:DropDownList name="country" ID="ddlCountry" runat="server" class="country"  data-native-menu="false"    style="white-space:normal";   onchange="javascript:window.location.href=this.options[this.selectedIndex].value;"         >                                   </asp:DropDownList>
  • jQuery UI modal dialog focus bug?

    I am trying to create a modal dialog box that has a vertical scroll for content that overflows.  For demo purposes, this dialog box contains an anchor and a bunch of divs (to overflow).  Here is my code: The HTML <body>   <div id="dialog">     <a href="javascript:void(null);">blah blah blah</a>     <div>some content to make the dialog scroll appear</div>     <div>some content to make the dialog scroll appear</div>     <div>some content to make the dialog scroll appear</div>     <div>some content
  • <select> box styling difference on safari and firefox, is there a jQuery solution?

    I am trying to simply style my select box so the text is centre aligned. It works in firefox but not in safari or chrome. I am thinking someone might know a little bit of jQuery that might do this?  http://georgewoolfe.com/yogurtline.html Thanks for your help. Angela
  • Image object

    I am creating a Image object in javascript  but it is showing a Image can not be resolved type please any one can help me i am new javascript and jquery
  • how do you organize the names for classes and IDs of GUI elements across different projects?

    When creating alternvative or derivative versions of html+js files, I notice a lack of a consistent strategy for naming the names, classes and ids. the consequence is that when I try to integrate those files which started to live a life of their own, I spend a lot of time unifying the mentioned identifiers. As i do this, I still feel at a loss of a uniform system. do you have any? Ideally, the name should be telling of the function and class of the element, be distinct from the commands and words
  • Facebook or LinkedIn style article widget?

    Does anyone know of a plugin that will allow you to include articles on a website that performs in the way that the include widget does on Facebook or LinkedIn? 1. Paste a URL into text area. 2. Widget retrieves synopsis and images. 3. Thumbnail for included article can be selected. 4. Preview of article with link is posted. I have been doing some searching and I have some idea of how I would write this, but I don't want to re-invent the wheel. Thanks in advance!
  • Support of Non-English Numbers - Validation Plugin

    Heyoo. The jQuery Validation Plugin works great fur numbers written like: 123,456,789.00 but here where I live, we write the numbers like: 123.456.789,00 so the validation fails. Here's my suggestion for an improved regex which validates both variations /^-?(?:\d*(?:(?:,|\.)\d+)?|\d{1,3}(?:(?:\.\d{3})+(?:,\d+)?|(?:,\d{3})+(?:\.\d+)?))$/ Please apply this change. cu Mr.Yeah
  • pageload ajax not showing

    how to debug ajax pageload on change page, I often faced not showing page somehow?
  • reset form field on form submit

    I am using jquery to validate a form that sends information from a form with a single field text input that is pre-populated with a prompt to complete. When the form is submitted, the field does not reset to the pre-populated prompt. This feature is desirable to enable the user to choose from an image gallery, then return to choose again. I feel sure there is a snippet of code missing that will solve the problem but so far can't find it. [code] <script type="text/javascript"> $(document).ready(function(){
  • Slider UI issue

    http://themartin.logicdesigns.com/demo/  If you click Floor Plans once the page loads, nothing happens, because it's set at the first slide. I'm not sure how/ where to set it to load the second slide when the page loads.  The second thing is allowing animation on pages that have galleries, Neighborhood and Gallery.  Is any one familiar with Superslides? Thank you! Erik
  • how do I managed to drag the image to the side?

    coloquei uma imagem no meu aplicativo, mas só consigo move-la para cima e para baixo. não consigo move-la para lateral. 
  • How to call $.getJSON() in a for loop?

    I am coming from the synchronous world and I have not grasped the concept of closures yet. I am trying to loop through an array of airport ids calling the getJSON method and build a new array with data from the returned json data for each airport.  Could someone please look at the code below and explain how to make it work? Thanks in advance!  var airportswx = [];     for (key in airports) {         obj = airports[key];         xdata = getwx(obj.apt);         airportswx.push({ 'apt': obj.apt, 'name':
  • 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