• Redirect if QueryString exists

    Hi, I am using below code. It works fine when no url query string but when url query string is specified then it's just reloading the same page with  no error in google console. can you help please.. success: function() { if (window.location.href.search("[?&]url=") != -1) { window.location.href = redirect; } else window.location.href = 'index.php'; },
  • Trying to get one column from SharePoint list view

    I am a newbie to JQuery. I went through a Lynda.Com tutorial but I still don't quite 'get it' with the selectors. I have a SharePoint view which displays a number with 4 decimal positions and I want to change it to 2.  I can't do this with OTOB SharePoint but I should be able to do it with JavaScript and JQuery (if I had the skillset for it.) Part of the problem is SharePoint doesn't always provide ID's and other distinguishing items in their html to facilitate the selections. Imagine that. So my
  • $.get not working in browsers

    I am using $.get to fetch the contents of a text file that resides in the same directory as my .htm and my .js files. Here is my code: $.get("myfile.txt", function(data, status)    {     myarr = data.split(',');     document.getElementById('sentence').innerHTML = myarr[0];     $("#dnv1").children().html(myarr[1]);     $("#dnv2").children().html(myarr[3]);     $("#dnv3").children().html(myarr[4]);     $("#dnv4").children().html(myarr[5]);     $("#draggable").html(myarr[2]);       }); When I view my
  • Copying div from other page

    Hello all, is there anyhow to copy the html div from other page without having to load it into another container? I searched a lot and this was the only way that I found out to do so. I've read the documentation and went far in the search for it. This is how it works if I use the load: var n = $('#contentcontainer').load('documentType.jsf #filters').clone(); that way I am able to do so, but then I would have to load everytime the action is taken, I want to just copy the div without having to load
  • select click on mouseover

    Hi there, I have an image and on image I put an icon, that you can see when the mouse is over the image. I would like catch the click on icon.  my html code: <img src="images/property/property1.jpg" alt="">         <span class="property-category">             <a class="addlist" href="#">                   <img src="images/fav-book-icons.png"</a>       </span>My jquery; $(document).ready(function(){           $('.addlist').mouseover({                   alert("click");                         });  
  • .outerHeight returns wrong height if code is inserted before the opening <doctype> tag

    Obviously this is user error, but I run into it a lot in our distributed application. People complain that things are not showing up, but the reason why is code has been inserted before the <doctype> tag. In this instance, the jQuery height methods all return the wrong document height. This is easy to reproduce. Use .height on any element to get the proper height. Then insert this before the opening <doctype> tag: <script>var error;</script> Then try again. The height will be wrong. Is this something
  • Repetition of function

    function item(ui){ var active = $('#accordion').accordion( "option", "active" ); var catidthis = $('.ui-accordion-header-active').attr('id');  ithtml = ''; $.post('sample.php',function(data){ $.each(data, function( index, value){ var dividit = value.ItemID;      var cls = (value.Isg==0) ? 'green' : 'red';      var bord = (value.Isg==0) ? 'green_border' : 'red_border';        ithtml += '<div class="normal_add_box left" id="'+ dividit +'">\            <div class="nm_image_area" id="nm_image_area">\
  • Uncheck checkbox if clicked on that corresponding div

    I have set of checkboxes on the left panel, when i click any one checkbox i activate a div filter on right top pane which contains  a cross, when i click that cross the checkbox should get unchecked this should happen dynamically for checkboxes. This is my progress: https://jsfiddle.net/edaatzy8/
  • 2 Level Cascading Dropdown Box using web service

    Hi Forum,  This is my first post :-) Does anybody have an example of a 2 Level Cascading Dropdown Box using web service. I did some searching around and cant find anything, I just want to jquery code without really using a plugin Any help would be great Graham
  • How to use this switcheroo plugin but not for displaying product?

    I want to use  https://github.com/OriginalEXE/Switcheroo  demo of said plugin: http://switcheroo.getkodo.com/ but not for the functionality shown on the demo page. Only for a part like here  http://www.wpthemegenerator.com/ (see the mobile ready bar) It took me some hours to find it but it may have been for nothing.  Here is the example html source that makes it work, taken  from a phpbb theme that uses the switcheroo plugin: <div class="responsive"> <!-- Mobile Button --> <div class="mobile-btn
  • jQuery Form Plugin

    Hi,   I've been trying to use this plugin http://malsup.com/jquery/form/#download and I am not able to get the cookie from the response. When I try xhr.getAllResponseHeaders() there is no Set-Cookie parameter despite the fact that in Chrome it is shown (development console).   I used the example on the plugin website and in the method they present I am trying to use the xhr parameter: function showResponse(responseText, statusText, xhr, $form)  {      alert('status: ' + statusText + '\n\nresponseText:
  • How can i put autocomplete suggestions 'on top' ?

    See the examples here: http://demos.jquerymobile.com/1.4.5/listview-autocomplete/ http://demos.jquerymobile.com/1.4.5/listview-autocomplete-remote/ There is the search box, then there is a "View Source" button. When suggestions are displayed, they are inserted before the "View Source" button and thus, the page grows in length. I would like the suggestions to float on top of the rest of the page. I *think* I could play with zindex to make this happen but am not sure - my CSS is not the best. Anybody
  • Tap event handler

    Hello everybody I am facing a problem related i think to event management and 300 ms delay between end tap action and real click event My scenario I write a on-tap handler and inside this handler i retrieve a value of an input field display in the page (but the value of the field is process and transform by the on change event of the field itself). My big problem is the delay between execution of the  change event and tap event  During execution of tap handler , the change event are not still triggered
  • load element when it is visible

    Hello, I'm a newby to Jquery. I like it ;) Now I want to load an element when it is visible, how can I do it? I use the plugin from github to check if it is visible:      Link to github plugin I want my canvas been drawn when it is visible: The canvas is a chart that is made with this plugin:       Link to second github plugin I have tried to use a while statement on rule number 48 but than the page won't load. Now I use a if - statement. The first time you visit the page, you won't see the chart
  • Can't find the quirk in my jQuery - need help debugging!

    I've been working on some jQuery for a site's navbar and it works for the most part: on the home page the menu icon is clicked to reveal the menu items and once the menu is scrolled out of view, the site's "main" menu becomes fixed to the top of the page. On the rest of the site, the main menu is just fixed to the top of the page.  Here's the dev site in action! Where things get tricky is that the menu at the top of the home page only triggers to open the menu so once the menu scrolls down the rest
  • upload image in MySql Table

    Hi there, I'm trying to upload an image from a html form into mysql table.  I the form have several input, so my jquery is: $("#spot_submit_review").click(function() {        var vtitle = $('#title').val();        var vlongitude =$('#longitude').val();        var vlatitude = $('#latitude').val();        var vemail = $('#email').val();        var vstato =$('#stato').val();        var vuser  = $('#user').val();        var vdescription =$('#summernote').code();        var vphone=$('#phone').val();  
  • iPhone 6 : jQuery(window).height() .width() dont work one bit.. fix included.

    Was testing my seductiveapps.com software on iPhone 6 recently and found that my dialog resizing routines worked but not the background resizing which uses jQuery(window).width() and .height().. Well, it worked, but only after changing orientation on the damn thing once or twice.. This works from the start of the page's lifetime (not mine, found it a few years ago somewhere as browser-independent window width/height detection code) : var height = (window.innerHeight?window.innerHeight:document.documentElement&&document.documentElement.clientHeight?document.documentElement.clientHeight:document.body.clientHeight);
  • Function only excuting with debugger after creation

    I have a Visual Studio 2013 project, ASP MVC 4 to be more specific. I am working on some dynamics multiple selects, the should be filled with the selected options when I chose a value on the parent select. It only works when I apply a debugger line to the top of the function. Here is fSFiddle https://jsfiddle.net/qtuxtrmL/ Here is the function with the issue function SetSelectedValues(elem)     {         debugger;         var combo = "#serial" + String(elem);         $(combo + ' option').each(function
  • Regaring Remove the JQuery Effect on HTML table in JavaScript

    Hello, I have use the below code in Ajax for first 3 column is constant whenever we scroll horizontal.  While adding new row in HTML table , i am able to add but first three columns of new row are not visible.Remaining columns are visible.So i need to remove the JQuery effect which i have given in previous function.. Jquery Effect    var table = $('#tbl_Material').DataTable({             scrollY: "300px",             scrollX: true,             scrollCollapse: true,             paging: false      
  • changing the layout of the spinner buttons

    Hi, I would like to change the layout of the spinner buttons, instead of having them at to rigth of the textbox I would like to have the increase at the top of the texbox and the decrease below the textbox. Does anybody know how to do that? Thank you
  • How to capture js error on Onload and every event in JS?

    How to capture js error on Onload and every event?(button click,onchange event,page onload )
  • ui.position - avoid to resize parent window

    Hi. when I am using ui.position the parent window has been resized. I moved elements as follows:       $( ".flexslider" ).position({           my: "right bottom",           at: "right bottom",           of: ".region-main-upper"       }); Now there is an empty area above the flexslider window which was moved down. How do I avoid that? test site
  • jQuery UI 1.11.4 compatible with jquery 2.1.4

    Hello! Is somebody able to tell me if I can use jQuery UI 1.11.4 with jQuery 2 (exactly 2.1.4). Thanks a lot in advance Wolfgang
  • jquery ajax calls not getting content ,but still the request is success (i.e Http status code : 200)

    Hi Team, I am facing a problem with jquery ajax call.  Every first request on the each day ,Jquery  Ajax call was not returning the data, but on subsequent request it is returning the data.  Please find the below sample code :  $.ajax({ url: http://localhost/Home/GetData,           dataType: 'json',          type: 'post',          async: true,          cache: false,          data: param,          success: function(Data) {      --my logic goes here } }); Could some one please help me out  that , what
  • .position only runs on Firefox

    Hi. I am working with Drupal 7.36 and Jquery 1.10. The script: (function ($) {   Drupal.behaviors.moveFlexsliderAtTheRightPlace= {     attach: function (context, settings) {       $( ".flexslider" ).position({           my: "right bottom",           at: "right bottom",           of: ".region-main-upper"       });       $( "#block-superfish-1" ).position({           my: "left bottom",           at: "left bottom",           of: ".region-main-upper"       });       $( ".view-logo" ).position({      
  • enhanceWithin() not working .

    Hello. am trying to populate a list view via ajax and jquery. after i have populated the data. the enhancement doesnt show. this is what i did. http://jsfiddle.net/mystro/zmhe575b/ now in the result pane are two different results. the first result labeled " Static".is what i want to acheive when i receive the data. and the second to the last one is  what am getting instead. when i inspect the element in the browser there is a new class(ui-link) that is been added to the <a />. i tried to remove it
  • Removing underline on a llink

    I tried using my own CSS to remove the link's underline .accordianContent .ui-link {     text-decoration: none; } But I had to resort to: <div id="accordianContent" data-role="collapsible-set">                     <div data-role="collapsible">                         <h3><a href="#" title="" style="text-decoration:none;">JSON Tutorial</a></h3>                         <p>Getting started with JSON</p>                     </div> Is there a way to get around using 'style' in the code? thx
  • Date and time picker on product page Woocommerce

    hi there, I'm banging my head for the last 3 days to fix something that looked very simple... I just need a date and time picker at a product in Woocommerce. The best way (i thought...) was to add a attribute to the article and use a time and calander from pickadate.js. Only,... it doesn't show! We have installed 4 different bookings and calender plug ins but they are to complicated or don't work. On the example page beneath you can see what i need. We installed Easy bookings BUT this plugin needs
  • jQuery .show issue (Safari iPad)

    I have recently started to learn jQuery and have been developing a responsive carousel to practice however I am encountering a strange problem where .show() doesn't seem to work correctly on Safari for the iPad.  The issue I am having is that when I click the left arrow I want the second slide to display however this doesn't seem to work (works in all other browsers including Chrome for the iPad), if I change the code to show the third slide rather than the second it works fine so I think the problem
  • [SOLVED] change all data-item

    I have many tags with  data-item="value"  it can be span div input or fieldset .. any ! depending on a value let's say if  ($v == 1)   how can I addClass to all the tags with data-item="1" ? thank you
  • Jquery mobile page change jumps back to previous page

    Hello,  I've a big problem with a jQuery Mobile Application: I'm using changepage to switch the page with currentPage. There are no transitions included still it jump back to previous page. And declared $(document).bind("mobileinit", function(){  $.mobile.pushStateEnabled = false;  $.mobile.defaultPageTransition = 'none';  });  Before the jquery mobile js loads.  Any one can help me how can I solve this issue??
  • JQuery Mobile: Header height

    I've just started using Jquery Mobile.  I need to build a responsive web site that is basically a mobile-ready HTML site that can be easily converted to a phone app later with PhoneGap and a single code base that runs on a website and most of the mobile devices with minimal effort to bridge compatibility. My first problem which sort of goes at the heart of whatever jQuery mobile is suppose to be exactly:  How do I change the width of the header. `  <div data-role="header" data-theme="c">     <h1>dumdum</h1>
  • Accordion with global function.

    Im using the global function and trying to use that in accordion how  should i declare newPanel http://jsfiddle.net/ng117reu/17/
  • Best plugin practice for dynamic table creation?

    Hey guys, I'm working on a plugin that will dynamically create product tables and append them divs (or whatever selectors call the plugin function). So far, it works as planned but the tables are generated by copying an HTML template that is hardcoded onto the view. My code is long so I'm not going to paste all of it but it is essentially like this (very generally and minus all the table logic functions): <div class="rowtemplate"> (row HTML) </div> $.fn.block = function(rows, maxrows) {       var
  • Form input stop working after using jquery.stickytableheaders

    Hi there, I do have a table where I needed to fix the header so I used this plugin jquery.stickytableheaders which is perfect except for one thing. Inside the table there is a filter that should reload the table with the record containing the value in the filter but it does not work anymore, here is the input code: <input type="text" name="fabrik___filter[list_1_com_fabrik_1][value][0]" class="inputbox fabrik_filter input-medium" size="20" value="" id="master_oda___ordine_dialogvalue"> The jquery
  • Form input field one after the other

    I have developed the following form using Bootstrap and have disabled all the input fields except the first input field  by giving a common classname.Now how do i enable them in such a way that after i enter surname i should enter first name after first name last name and so on. Any help would be greatly appreciated . Thanks in advance  The following is the code which i have used to disable the input fields. $(document.ready(function() { $(".disab").attr("disabled",true); }).
  • UI Dialog and JW Player

    I have a problem with the Dialog UI and JW Player. I set up a link that when clicked opens a dialog showing the video using JW Player. The problem is that when you first click the link to open the dialog, the dialog window is blank until you actually click and drag the window, then the video shows and plays fine. Does anyone know what could be causing this? Thank you! I can't provide a link, but here is a screenshot of the empty dialog. And here is my code:          <div id="video-player-container">
  • Javascript and JSON help with this script

    I was wondering if someone could please tell me why this html file does not display the way I want it to. Thanks
  • Alt text in expand collapse

    I'm just getting back into mobile hybrid development after 6 years and starting off slow. I am using, data-role="collapsible-set", and I'm trying to figure out how you would add the alternative text for screen readers to let the user know that it is "Open" or "Closed". Or, do I have to write my own script? thanks
  • ajaxForm repeat attached file

    hi everybody i have a problem with the plugin ajaxForm i try to upload many times but when the first file is uploading i upload other file parallely but the first upload has file and the second file does not file when the uploads have finished the file attached at the first uploading is repeated at the second uploading but at the second i dont attache any file what is the problem? this is my code  $(document).on('submit', '.newpost', function(e) { e.preventDefault(); // prevent native submit var
  • 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