• Trigging jQuery without a specific event

    Hello Folks: Hoping to get some help with a small problem. The problem is outlined below: I've a registration page which shows different groups of fields for different types of registrations. So... a user must first choose the registration type, and then a jQuery function shows the appropriate fields. The user enters data and POSTS it to the same .php page. php validates data (I'm not using jQuery to do the validation because I don't want to send passwords through jQuery). If php populates an $errors
  • can't auto-scroll bootstrap js modal

    I am using the modal from bootstrap js. I would like it to automatically scroll to a particular element within the modal but nothing I've tried works.  I've been trying something like this: var pos = $('#myModal.elementClass').offset().top; $('#myModal').closest('body').scrollTop(pos);
  • Horizontal twitter ticker

    I'm looking to create a simple ticker that scrolls from right to left, but the only catch is that it needs to be dynamic.  I need for it to add an item to the ticker (that's already been loaded) when a javascript function is called (basically it needs to queue items to display next and have the ability to manipulate what will show next).  I don't know where to start.  Any suggestion?
  • Using Ajax to pull an html file in to a jQuery code

    Hi there im trying to use the jQuery news ticker (Found here: http://www.jquerynewsticker.com/ )  to load data from a feed html file using the following code: <ul id="js-news" class="js-hidden">     <div id="news-item"></div>    </ul> <script>     $("#news-item").load("latest-news2html.html"; }); </script> The reason im doing this is that im working on a website for a friend who needs to be able to edit the ticker content, but the CMS her site is on doesnt recognise the ticker or allow you to make
  • how to use single jquery minified versiion instead of multiple

    I am new to jquery. Actally in my website two jquery gadgets are using of using two different jquery minified versions. if I use both my webpage size is increasing. how to reduce my webpage size?
  • Load xml, clean it, save to new xml file on server.

    I am relatively new to programming, so please be kind and detailed. My entire point of this prototype page/code is to load an xml file, look for a target parts of an addresses, remove that xml node at an ancestors level and save the file back the server with a different name xml. I have everything working except it seems I can only post the xml .text() but I really want the full xml (with tags) to go to the php page to write the xml file on the server. The code is currently  bloated with check points,
  • Memory Leak on jQuery's attachEvent

    I posted the question below as a problem in a new post: https://forum.jquery.com/topic/memory-leak-on-jquery-s-attachevent-9-10-2012 Hi all and thanks for taking the time to read this. I've been struggling for a long time now to try solve what I believe it's a bug on jQuery library. First, the memory leak I've identified is only applicable to IE and I tested on IE 7 only. I used IEJSLeaksDetector to identify the leak point and it points me to this portion of jQuery js file: // Only use addEventListener/attachEvent
  • Why this $.post() does not call the target php function?

    I cannot for the life of me see what is wrong with the $.post call. This used to work, so I'm baffled as to what caused it to break. I am trying to use $.post() to pass two parameters, which are used to retrieve some data values in a database call, in the fetchAlleles.php script, then assigns them some id's in the page. When I step through the code using a debugger, however, I am unable to step into that script, and the variable "result" is never defined. If anyone can point out the error, I would
  • Need Advice for an Mobile app from Community

    Hi guys,          I need to create an app which contains an webpage that has a canvas and a sidebar . The sidebar should contain few components of different sizes .The basic idea is to create a scrabble like game where users can drag and drop few components from the sidebar onto canvas . Can anybody please advise how this can be accomplished ? Thanks in advance
  • if class changed than do ....

    Hello, i need a solution for this: if('#myelement').hasClass('myClass'){ do anything } This would only be checked at the Loading of the page, but the class will be added through javascript. How to solve this? And i can't write a setTimeout because the "do anything" plays a video". I need a solution like "if changed or .live ?! thank you
  • problem with receipt of custom event

    Hello, in Jquery 1.6, I create a new window, and in that window I create a custom event, triggering it when the window closes var evnt = jQuery.Event("previewWindowClose");  jQuery(window).bind("onunload", function() {              window.opener.jQuery(document).trigger(evnt, {"layerID":"' + layerID + '"});         });  in the main window, I bind a handler function to the 'previewWindowClose' event. jQuery(document).bind("previewWindowClose", function(evnt, evntData) {  alert("handler called"); 
  • Getting phone number of the device???

    Is there any way to get the phone number of the device without having to ask the user? Are there any permission prompts in place to collect more data about user's device without requiring them to type in? I should be able to collect some information about the client using javascript, but is phone number one of them? What are the limitations, Pros I appreciate your time, and any guidance you provide.
  • Reading a JSONP array

    Hello there. I have an ASP page witch generates me the following JSON: jQuery182022068346734158695_1349456086955({"pr_codigo":"P111528 ","cr_codigo":"210373","serie":"02","turma":"0101","ma_codigo":"06129","sigla":"ARTE E CUL"}{"pr_codigo":"P111528 ","cr_codigo":"218623","serie":"01","turma":"0101","ma_codigo":"05664","sigla":"DESENHO CO"}); And i have the following JavaScript function that will read those JSONS $.ajax({ url: myJsonUrl, dataType: 'jsonp', success: function(data){       alert("sucess");
  • Layout resetting after 'back' button, hhen JS populates a list element

    Hi there. Ive got a UL with ID ='listaTurmas'. All i want to do is, everytime this function is called, the list contents is refreshed according to the Sessao.turmas array. The first time it shows up, it works fine. The second time, layout is completely lost. Would apreciate any help ! THis is my Div: <div data-role="page" id="turmas" data-theme="b"> <div data-role="header"> <h1>List</h1><a onClick="history.back(-1);" data-role="Button">Back</a> </div> <div data-role="content"> <ul data-role="listview"
  • Social Sharing Widget Disappears on Back Navigation

    No clue why this is happening.  Please try this: 1.  start here: http://19thway.com/cck/ 2. navigate forward to recipe page (social widgets on top left) 3. navigate forward one page using "locate ingredients" at bottom 4. click back button top left (no social widgets!!) Can anyone explain.  Thanks
  • jQuery trigger play issue

    http://goo.gl/sio8b It will play shutter sound after click play button, and play mail sound after 2 seconds, but on mobile it's only play shutter sound, I thought audio play event only trigger by real click behavior, how to trigger browser play the sound with out really click on the element. I already use preload property, but the sound still a little bit played lag. Android Dolphin Browsers both work Android Chrome only shutter iPhone Safari only shutter iPad Safari only shutter
  • How would get this loop to work correctly to append div

    <!DOCTYPE html> <html> <head>     <link rel="stylesheet" type="text/css" href="testMyJson.css" />     <script src="http://code.jquery.com/jquery-1.6.4.min.js"></script>     <style>     .the-container { width:400px; height:250px; border-style: solid; border-width:3px; border-color:black }     .the-container ul { margin:0; padding:0; list-style:none; }     .the-container li { width:30px; height:250px; margin:0 5px; position:relative; float:left; }     .the-container li a { position:absolute; bottom:0;
  • adding a javascript array to the post variables

    I am catching a submit in jquery, performing a check and submitting the form if the check passes.  If the check passes, I would also like attach a javascript array I have created to the post variables that get sent to the PHP page.  Here is the code I have so far.  All I am missing is attaching the array. $('form').submit(function(e) {                 var barcodes = new Array();                 $('.highlighted').each(function(i, obj) {                     var barcode = $(':nth-child(2)', $(this)).html();
  • AJAX

    I have been experementing with standard javascript ajax it goes something like this Var U = new xmlhttprequest   Send data function { U.open(properties); U.setRequestHeader(properties U.send(data); }   When data is recieved (U.readystatefunction) { do something with the data }   Oh and the initial creating of the object is replaced with a string of if statements which test the browser for compatability with various alternatives to xmlhttprequest in order to select a compatable one. would i be better
  • Hello friends! Help please: problem with the tag "select" on a menu

    The problem is to choose an option tag "select" without closing the menu. Help please! Job: http://jsfiddle.net/Yrz5c/9/  <div class="presup">                  <ul>                     <li><a href="#">Button-one<span>▼</span></a>                                                 <ul>                             Cont-one                             <select id="select">   <option value="volvo">Volvo</option>   <option value="saab">Saab</option>   <option value="mercedes">Mercedes</option>   <option value="audi">Audi</option>
  • Creating a JSON Object Array

    Hi all - The below solution works.  However I'm not sure this is the best approach.  Can someone supply a "better" way of creating the json object below (if there is one)?  Thank you for any advice you can provide. var buildInvItemsObj = function() {     AVDB.transaction(function (tx) {         tx.executeSql("SELECT * FROM invoice_items WHERE invStatus = ?;", [ 'Incomplete' ],             function (tx, results) {                 if (results.rows.length > 0) {                     var jsonObjItems
  • jQuery 1.8.1 | How to get dynamically set li number of ol with corresponding title?

    Is there a way to get the li number and title (after clicking on the li) of an ordered list that is set dynamically via ajax or jason? I use this as example for displaying the li in the hard-coded ol: $("#List ol").append('<li><p>' + '<img src="'+thumbnail+'"'/><br />' + '<span class="title">'+imageTitle+'</span></p></li>'); A function dynamically fetches (after selecting an option from a pulldown menu) the thumbnails (fixed amount of 25 thumbs) and displays them (with their titles) in the ol div.
  • Is it possible to just keep the jQuery mobile code for the nav bar?

    I have an existing mobile site which I am using Phonegap to turn into native apps. My existing html tool bar uses css position: fixed which is not compatible in iOS or Android. Therefore, I would like to use the fixed nav/toolbar out of jQuery mobile. I already have it installed and it looks great :-) The only problem is that the rest of the jQuery script (which is not being used) is affecting passing parameters when I use the search function already built into the site. I know there are ways to
  • I am trying to prepend an image until something loaded.

    I have the following code. My prepend is not working. While my images are loading the ajax-loader.gif spinner is not displaying. Is the code syntax right.   $(document).ready(function () {             $(loaderImage).prepend("#book").prepend($('<img src="books/images/ajax-loader.gif", style="position:absolute;left:40%;top:50%;z-index:5000"/>').addClass("ShowLoading"));             BookID = getParameterByName("bookid"); //Get the query string param that has the book Id              CurrentPage = 0;
  • CSV file to HTML

    Is there a Jquery mobile code that will help me to import csv to html page ? Thank you very much
  • Slow reaction on Playbook OS

    Hi, I'm developing an app for android an Playbook OS. On android the app runs fast, transition-effects are looking good and everything is fine. But on my Playbook (Playbook OS 2.1) the app runs slow, sometimes the reaction on user-clicks takes about 10 - 15 seconds. I used web inspector to have a look at the web console but no errors appeared there. For my app I'm using Phonegap/cordova 2.1, jQuery 1.8.2 and jQuery mobile 1.2.0. Unfortunately I have no idea what could be the reason for this lack
  • Issue regarding checkboxes in IE

    I've got an issue where checkboxes generated with jQuery gets the value "on" in stead of the correct value, also described in this question http://stackoverflow.com/q/4071289/927408 on StackOverflow. Anyone familiar with this, or got an idea on how to solve it?
  • issue with $.post

    Hi all, I am getting used to js/jq but i'm having issue with the $.post as when i click the button that has been sent to post the data in the form, it creates a query string in the address bar which only get does this. So why does post do this as well. Any help will be great. Thanks
  • Fade addclass

    Im trying to fade/or animate addclass but nothing happens, when i add the second prameter (time) it gets stuck. Any suggestions? $('.foodlab, .skafferiet').hover(    function(){ $('body').stop(true).addClass('foodlab-color') },    function(){ $('body').stop(true).removeClass('foodlab-color') } ) $('.foodlab, .skafferiet').hover(    function(){ $('body').stop(true).addClass('foodlab-color', 500) },    function(){ $('body').stop(true).removeClass('foodlab-color', 500) } )
  • Jquery image hover

    Hi guys, I really need your help, I can't find a tutorial to make something like this: http://www.sanitobel.be/ When you go hover the menu section, it becomes RED and the image change in only one canvas... Anyone can help me to achieve this or give me a tutorial? Many thanks, Jhon
  • using setinterval to make my ajax call repeatedly not behaving correctly?

     function CheckNewImages() {                  if ($('#hdnNewImageCheckRequired').val() == "True") {              $('#newImagesAlert').show("slide");              var data = '{"caseID": "' + $('#hdnCaseID').val() + '", imageCount: "' + $('#hdnImageCount').val() + '"}';                                                   $.ajax({                  type: "POST",                  url: "<%=GetRoot() %>Teledermatology/loggedin/teledermwhatsnext.aspx/CheckNewImages",                  data: data,                 
  • are 2 scripts possible?

    I'm brand new to JQuery, but I'm already stuck. I have existing code within this: <script language="javascript">...</script> I tried adding this: <script type="text/javascript" src="../../js/jquery-1.8.2.min.js">     $(document).ready(function() {         alert("got here");     }); </script> I'm expecting an alert when the page loads, but nothing appears.
  • Calling a jquery function from inline html

    Hi guys Really new to JQuery, but I know PHP pretty well, so hopefully that will help me. My problem is this ... I need to call a jquery function from an inline event handler, like so ... <a id="contact<?=$business['bus_id']?>" onclick="toggleContacts('<?=$business['bus_id']?>', '<?=$business['bus_count']?>');" Now, the function is declared within the usual document ready function, what is the proper way to do this? The reason I need to do it this way, is because the function needs access to the
  • Badge Icon with Bubble Count (like iOS) in Jquery Mobile

    I have a header with few icons, i want to show a bubble count dynamically in a icon like badge icon with notification count. How can we do in jquery mobile? I searched in jquery mobile for bubble count but its currently available with listview, but i want to show the count in a icon right top corner like iOS notification count. Find the below reference url for badge icon that needs to implement in jquery mobile, url: http://en.wikipedia.org/wiki/Apple_Push_Notification_Service
  • using load function within <ul> tags

    Hi there im trying to use the jQuery news ticker (Found here: http://www.jquerynewsticker.com/ )  to load data from a feed html file using the following code: <ul id="js-news" class="js-hidden">     <div id="news-item"></div>    </ul> <script>     $("#news-item").load("latest-news2html.html"; }); </script> The reason im doing this is that im working on a website for a friend who needs to be able to edit the ticker content, but the CMS her site is on doesnt recognise the ticker or allow you to make
  • problem in calling restfulwebservice with jqery and ajax over cross domain

    Hi, I have implemented restfulWebservice and deployed in jboss server in abc domain(http://abc.com:8180/restfulweb). when I am using jquery and ajax to access the restful service from different application(which is .net app) and different domain(http://xyz.com:1123/care/hello.html), I am not able to see the result on the page. It is working perfectly in local domain but not in the cross domain. Find the below code is used to call the restful webservice.     $.ajax({           type    :    'GET',
  • Enter Key Issue in JQuery Mobile Dialog

    Hi,       When I type a data inside a textrarea in a JQuery Mobile Dialog in the below format a b c and on click of the submit button in the dialog when i try to retrieve the value of  the textarea in the main page using the textarea id i get the value as abc instead of the above mentioned format. The enter key was truncated. Can anyone help me on this. Because of this issue My data gets saved with a wrong alignment while saving to db.
  • Simple delay for jFlow help!

    I need to add a delay to jFlow, so something else runs one second before it stransitions, and I can't find the way through. Here's a link to the documentaiton for the timer, where I think is the way to go, but I'm affraid it's intended for step animations, rather than what I want. http://www.flowslider.com/for-developers/controllers/timer I'll try preventing the auto-play and setting my own timer in the while, but I'll leave this posted since I suck at managing JS timers and I'm affraid the pause
  • data-icon not showing in Internet Explorer 8

    Here's the test page I'm working on http://test.slimspa.eu/andrea/mobile/index.php you can also click on links to open the other pages. The problem is that *all* icons (home icon, arrows, etc) are *not* displayed in IE8. example code for icon: <a href="index.php" data-role="button" data-icon="home">Home</a> (perfectly working on other browsers) I've searched a lot on the internet and in this forum too, but still didn't find any apparent solution to that. Note that if you go with same IE8 on the jQuery
  • Help to validate correctly: form with ajax

    Hello friends. This form works to email. I need help: when validate display the div "this form has been sent correctly" Example: http://pruebajquery.site50.net/ $("#form1").submit(function(){      if(validateUsername() & validatePassword1() & validatePassword2() & validateEmail())       return true; else return false; }); $(document).ready(function() {   $(document).ajaxStart(function() {         $('#loading').show();         $('#result').hide();     }).ajaxStop(function() {         $('#loading').hide();
  • 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