Search Results

Search found 23820 results on 953 pages for 'jquery ui autocomplete'.

Page 40/953 | < Previous Page | 36 37 38 39 40 41 42 43 44 45 46 47  | Next Page >

  • jQuery.ajax checking if there is already another xhr

    - by digitalFresh
    I have a page when, if the user is near the bottom of the page, loads the next page. I just recently switched it to jQuery, and now use the jQuery.ajax() function to get the data. However, now i cannot check if the xhr is already loading, making the page load multiple xhrs when the user near the bottom. My listener is: $(document).scroll(function () { if(/* scrollbar is near bottom */) loadxhr(dat++); //function that calls jQuery.ajax() } }); Basically, can you track the readyState of the call in a global scope?

    Read the article

  • Want to load jquery dialog from a different web-page

    - by Jake
    I'm a bit of a n00b with jquery so this one is probably an RTFM question: I'm writing an application to create a somewhat complex record for my client. Building the record requires doing a couple of server side searches inside a dialog. Right now I have everything framed up in 1 file (asp.net) and it's ok. But I can see as I add the business logic and the communication with the server this is going to get really ugly. I'm alreay putting most of the javascript in external files, but I'd like to move the HTML for the dialogs out too. How do I get the jquery dialog method to load the dialog body from the html files? Something like: getDialogHTML(dialogHolderDiv); <---magic goes here var dialogOptions = { ... }; $("#"+dialogHolderDiv).dialog(dialogOptions); $("#"+dialogHolderDiv).dialog('open'); any help will be apperciated .

    Read the article

  • onclick form submit, open jQuery loading image until form submit complete

    - by Jackson
    Hi Team, Can you offer a bit of advice. I am using a hosted SAAS CMS solution that enables you to create basing apps with a web apps system. I have created a form for members to submit a bunch of images and content to their own area. Everything is working great except if the images being submitted via the form are large, it takes ages for the form to submit and go to the thank you page. I am already using jQuery UI to split the form in to 5 steps and using the jQuery facebox plugin for instructional popups. My question is, what would be the best way to display a loading gif (in facebox or in another suggested overlay) while the form is being submitted? Thanks for your help! Jack

    Read the article

  • using JQuery and Prototype in the same page

    - by Don
    Hi, Several of my pages use both JQuery and Protoype. Since I upgraded to version 1.3 of JQuery this appears to be causing problems, because both libraries define a function named '$'. JQuery provides a function noConflict() which relinquishes control of $ to other libraries that may be using it. So it seems like I need to go through all my pages that look like this: <head> <script type="text/javascript" src="/obp/js/prototype.js"></script> <script type="text/javascript" src="/obp/js/jquery.js"></script> </head> and change them to look like this: <head> <script type="text/javascript" src="/obp/js/prototype.js"></script> <script type="text/javascript" src="/obp/js/jquery.js"></script> <script type="text/javascript"> jQuery.noConflict(); var $j = jQuery; </script> </head> I should then be able to use '$' for Prototype and '$j' (or 'jQuery') for JQuery. I'm not entirely happy about duplicating these 2 lines of code in every relevant page, and expect that at some point somebody is likely to forget to add them to a new page. I'd prefer to be able to do the following Create a file jquery-noconflict.js which "includes" jquery.js and the 2 lines of code shown above Import jquery-noconflict.js (instead of jquery.js) in all my JSP/HTML pages However, I'm not sure if it's possible to include one JS file in another, in the manner I've described? Of course an alternate solution is simply to add the 2 lines of code above to jquery.js directly, but if I do that I'll need to remember to do it every time I upgrade JQuery. Thanks in advance, Don

    Read the article

  • using focus function with jquery live

    - by Pradyut Bhattacharya
    I have a page in which i can successfully use the jquery focus function using live... $(".comment_text_class").live('focus', function() { //do something... }); but when something comes into the page(ajax loading) the focus function doesn't work as should be using the live function... as suggested i used focusin function.. $(".comment_text_class").live('focusin', function() { //do something... }); but still new elements do not have the behavior... also i want to hide something using the live function but it doesn't work at all.. even for the elements in the page itself... $(".comment_button").live('hide', function(){}); is the focus and hide function implemented at all by jquery 1.4.2 or is it a bug... because the live focus was not working with jquery 1.4 version... Please help... thanks Pradyut India

    Read the article

  • jQuery AJAX not redirecting?

    - by MidnightLightning
    I have a simple PHP page (for testing) that simply calls header("Location: http://www.example.com");exit;, which resides on the same server, in the same directory as another file with the following jQuery Javascript: $(document).ready(function() { jQuery.ajax({ type : 'GET', url : 'bounce.php', error : function(xhr, status, error) { console.log("ERROR: ", xhr, xhr.status, xhr.getAllResponseHeaders()); }, complete : function(xhr, status) { // Get headers of the response console.log("COMPLETE: ", xhr, xhr.status, xhr.getAllResponseHeaders()); } }); }); I was expecting (from several other StackOverflow responses) for the xhr.status to return "302", but instead the AJAX call is triggering the "error" event (and then the "complete" event), and xhr.status is returning 0 (zero), and .getAllResponseHeaders() is coming back null (in both the error, and complete functions). Firebug is showing the "302 Moved Temporarily", and the response headers. So why is this triggering the error event, and not passing along the proper 302 code, and headers? Is this something to do with the Same Origin since the bouncing script and the fetching script are both on the same server? Is this jQuery or Javascript's fault?

    Read the article

  • How can I drag from a connected vertical list to the first item of a another list below with jQueryUI Sortable?

    - by Denis Hoctor
    Hi all, I have have several ULs vertically down a page. They are setup using jQueryUI's sortable(). My live example is: http://jsfiddle.net/pborreli/pJgyu/ I can drag from answers to make it the final element in questions. But when I drag from questions to answers the placeholder jumps to the second item in the questions list. At that point I can then drag it to the top. Any ideas why I am having this issue dragging from a list above to the first element of a list below? I've tried editing the padding and margin on both the lists and the sortable items. Thanks, Denis

    Read the article

  • jQueryUI Sortable won't accept connected Draggable on a nested UL

    - by Eric
    I've posted an example here: http://jsfiddle.net/ericclemmons/LEHLX/2/ Really, what it comes down to is the classic "assigning users to groups" issue. I have a list of users and a list of groups, but I'd like to be able to have nesting of the groups: user "Eric" would be in "Users", "Web", and "Administrators". The problem is that I cannot drag a user to an empty <ul> in the list.

    Read the article

  • Real-time data on webpage with jQuery

    - by Steven Hepting
    I would like a webpage that constantly updates a graph with new data as it arrives. Regularly, all the data you have is passed to the page at the beginning of the request. However, I need the page to be able to update itself with fresh information every few seconds to redraw the graph. Background The webpage will be similar to this http://www.panic.com/blog/2010/03/the-panic-status-board/. The data coming in will temperature values to be graphed measured by an Arduino and saved to the Django database (this part is already complete). Update It sounds as though the solution is to use the jQuery.ajax() function ( http://api.jquery.com/jQuery.ajax/) with a function as the .complete callback that will schedule another request several seconds later to a URL that will return the data in JSON format. How can that method be scheduled? With the .delay() function?

    Read the article

  • jQuery plugin options: required, optional, inaccessible

    - by Trevor Hartman
    I'm curious how to specify options to a jQuery plugin in a way that some are required, some are optionally overridden, and some can't be touched. I started off with the usual: jQuery.fn.plugin = function (options){ var defaults = { username: "", posts:10, api: "http://myapi.com" } var settings = jQuery.extend({}, defaults, options); } Let's say I want username to be required, posts is optional (defaults to 10) and you (you being the user of the plugin) can't change api, even if they try. Ideally, they'd all still be in the same data structure instead of being split into separate objects. Ideas?

    Read the article

  • Change image using jQuery

    - by alex
    I have a html-page where used jquery-ui accordion. Now I have to add in this page 2 image which should vary depending on the active section. How can I do it? HTML: <div id="acc"> <h1>Something</h1> <div>Text text text</div> <h1>Something too</h1> <div>Text2 text2 text2</div> </div> <div id="pic"> <img class="change" src="1.png"/> <img class="change" src="2.png"/> </div> JS: $(document).ready(function() { $("#acc").accordion({ change: function(event, ui) { /* I'm think something need here */ } }); });

    Read the article

  • jQuery - Add click event to Div and go to first link found

    - by LuckyShot
    Hi guys, I think I've been too much time looking at this function and just got stuck trying to figure out the nice clean way to do it. It's a jQuery function that adds a click event to any div with a click CSS class found in the page and when clicked it redirects the user to the first link found in the div. function clickabledivs() { $('.click').each( function (intIndex) { $(this).bind("click", function(){ window.location = $( "#"+$(this).attr('id')+" a:first-child" ).attr('href'); }); } ); } The code simply works although I'm pretty sure there is a fairly better way to accomplish it, specially the selector I am using: $( "#"+$(this).attr('id')+" a:first-child" ) looks too long and slow. Any ideas? Please let me know if you need more details. Thanks! PS: I've got some jQuery benchmarking reference from Project2k.de here: http://blog.projekt2k.de/2010/01/benchmarking-jquery-1-4/

    Read the article

  • Downloading jQuery UI: Ok, so what part of this mess do I copy to the server?

    - by Martha
    From the "should be simple, but..." files: Trying to get started with jQuery UI. Went to the site, used their custom builder thingy to assemble the parts I need, made myself a custom theme using the Theme Roller, downloaded the zip file thus produced, unzipped it on my local drive. Ok, so I have 37 folders, 311 files, and a total of 2.4 MB. Ain't no way in hell all this is going on the server. What parts do I need to put there? 'css' 'custom-theme': jquery-ui-1.8.custom.css, 'images' subfolder with 12 .png images 'development-bundle' 'demos': demos.css, index.html, plus 18 subfolders, but I'm guessing "not needed" 'docs': 17 .html files, but again, I'm guessing "not needed" 'external': 4 .js files, one .css 'themes': 'base' and 'custom-theme' subfolders, each with 8 or 9 .css files and an 'images' subfolder with about a dozen images 'ui': 25 .js files, an 'i18n' subfolder with 53 .js files, and a 'minified' subfolder with 24 .js files 'js': jquery-1.4.2.min.js and jquery-ui-1.8.custom.min.js Also, the file structure. Our server is set up something like this: root admin (administrative tools) css forms (the gist of the site lives here) images include (asp code snippets that are used by multiple pages) js (just a few things right now, like an ancient wheezing spelling checker) As far as I can tell, the jQuery css files assume that (1) each theme is in its own folder, and (2) each folder has its own images subfolder. How can I convince it otherwise? i.e. put the necessary .js files in the 'js' folder, the .css files in the 'css' folder, and the images in the 'images' folder?

    Read the article

  • Jquery Widget Performance

    - by jamie-wilson
    I am working on an interface which involves ALOT of javascript. There is a calendar and blocks drawn on the calendar. The calendar is a jQuery widget, which works beautifully. The blocks drawn on top are also jQuery widgets. While it works - I am wondering, every time I create another block, is the widget fully duplicating, or is it referencing the widget? If I end up with 200 blocks on the screen, do I have 200 copies of the widget? Because if so i'm sure this will impact the performance quite heavily. Also it would determine whether I have functions inside the widget, or have them external to the widget looking in if that makes sense. Just putting some feelers out there for thoughts. I couldn't find anything by searching online.

    Read the article

  • edge case for selecting a checked radio input with jquery

    - by altvali
    Hi all! I have a problem selecting a checked radio button with jquery. The radio buttons are generated by a function from a MVC that i'd rather not change and its name is like id[number]. Simply put, I have to check if any of these buttons are checked: <input type="radio" name="id[1]" value="1"/ <input type="radio" name="id[1]" value="2"/ The problem is that jQuery('input:radio[name=id[1]]:checked').val() will select some function from the jQuery library. Any help will be much appreciated.

    Read the article

  • maintain dialog center with dynamic content

    - by mcgrailm
    I would have a dialog with the following $("#statusbox").dialog({ autoOpen: false, bgiframe: true, modal: true, width: 'auto', height:'auto', title:"Check Order Status", buttons: { Find: function() { get_status(); }, Close: function() { $(this).dialog('close'); } } }); and when the user hits the find button it runs ajax and returns orders to the dialog and it get dynamically re-sized but it only extends the box down. Is there way to make the box extend up and down so that the dialog remains centered ? also if there was enough content then it could potentially go beyond the bounds of the page so I would think I could use a max height to prevent that but what do I do if they re-size the window ? thanks for any help

    Read the article

  • Handling PHP exceptions with JQuery

    - by Itamar Bar-Lev
    Hello, I'm using JQuery to call a PHP function that returns a JSON string upon success or throws some exceptions. Currently I'm calling jQuery.parseJSON() on the response and if it fails I assume the response contains an exception string. $.ajax({ type: "POST", url: "something.php", success: function(response){ try { var json = jQuery.parseJSON(response); } catch (e) { alert(response); return -1; } // ... do stuff with json } Can anyone suggest a more elegant way to catch the exception? Many thanks, Itamar

    Read the article

  • Having trouble deselecting all jquery tabs

    - by Julian
    I set up some jQuery tabs to start off with no tabs selected like this: $('#tabs').tabs( { selected: -1 } ); Then I also have a separate link that when pressed needs to deselect all the tabs. $("#deselectButton").click(function(){ $('#tabs').tabs( 'select' , -1 ) }); or $("#deselectButton").click(function(){ $('#tabs').tabs( 'selected' , -1 ) }); The deselectButton click does deselect the tabs content, however the tabs title remains active with the class 'ui-tabs-selected ui-state-active'. What is the correct way to deselect all the tabs?

    Read the article

  • How to pass jQuery variable with AJAX to PHP page

    - by Walden
    Trying to pass the variable "flickrurl" to a PHP page with jQuery/ajax. It works when using a plain text string and not the variable. Am I assigning the variable properly? see the full code in action here: http://is.gd/c9ytI $trash.droppable({ accept: '#gallery > li', activeClass: 'ui-state-highlight', drop: function(ev, ui) { deleteImage(ui.draggable); //set variable equal to src of image tag in #gallery > li var $flickrurl = $item.find('img').attr("src"); //pass variable to php page $.post("updateDB.php", $flickrurl ); } });

    Read the article

  • jquery-infinite-carousel - jump 3 items instead of one

    - by Rob B
    Successfully used jquery-infinite-carousel in the past but for my current project I need it to loop forever AND also jump 3 items at a time. Example of how it works jumping 1 at a time here. jQuery.fn.carousel = function(previous, next, options){ var sliderList = jQuery(this).children()[0]; if (sliderList) { var increment = jQuery(sliderList).children().outerWidth("true"), elmnts = jQuery(sliderList).children(), numElmts = elmnts.length, sizeFirstElmnt = increment, shownInViewport = Math.round(jQuery(this).width() / sizeFirstElmnt), firstElementOnViewPort = 1, isAnimating = false; //console.log("increment = " + increment); //console.log("numElmts = " + numElmts); //console.log("shownInViewport = " + shownInViewport); for (i = 0; i < shownInViewport; i++) { jQuery(sliderList).css('width',(numElmts+shownInViewport)*increment + increment + "px"); jQuery(sliderList).append(jQuery(elmnts[i]).clone()); } jQuery(previous).click(function(event){ if (!isAnimating) { if (firstElementOnViewPort == 1) { jQuery(sliderList).css('left', "-" + numElmts * sizeFirstElmnt + "px"); firstElementOnViewPort = numElmts; console.log("firstElementOnViewPort = " + firstElementOnViewPort); } else { firstElementOnViewPort--; } jQuery(sliderList).animate({ left: "+=" + increment, y: 0, queue: true }, "swing", function(){isAnimating = false;}); isAnimating = true; } }); jQuery(next).click(function(event){ if (!isAnimating) { if (firstElementOnViewPort > numElmts) { firstElementOnViewPort = 2; jQuery(sliderList).css('left', "0px"); } else { firstElementOnViewPort++; } jQuery(sliderList).animate({ left: "-=" + (increment), y: 0, queue: true }, "swing", function(){isAnimating = false;}); isAnimating = true; } }); } };

    Read the article

  • multiple jQuery Cycle slideshows get superimposed

    - by gmorehouse
    I'm using the jQuery cycle plugin to create multiple slideshows on a single page (which, once I get this problem figured out, will be started/stopped by mouse hover -- yeah, I know there are 9 slideshows on the page). Problem is, when I tell more than one slideshow to start cycling, whichever ones I call cycle() on get superimposed. So, all the images from slide 1 are superimposed, then they all transition to slide 2, etc. I can tell they're being superimposed because the first slide of each slideshow contains a transparent PNG. This happens whether I call cycle() in a jQuery each() iterator, or even if I call it by hand on just two or three of the containers with a jQuery id selector. The relevant page is http://zi.ma/cycle

    Read the article

  • Converting a jQuery plugin to work on all objects, not just the DOM

    - by Jon Winstanley
    I am using the jQuery physics plugin for a pet project I am working on. The plugin enables the moving of DOM objects in realistic ways using velocity, gravity, wind etc. However I want to use the plugin to calculate where objects are to be placed inside a canvas element, not DOM object. How do I change the plugin script to work for ANY object with 'top' and 'left' properties rather than only working with DOM objects found with a jQuery selector? Currently the script functions look like this: jQuery.fn.funname = function() { return this; };

    Read the article

  • Combining multiple jQuery functions

    - by Mark
    Is there any way to combine all of this to reduce the amount of js? This is just an example of some of the jquery dialogs I have in my site, there are a few more too. Thanks. //initiate Search refinement dialog here $("#chooseMoreCnt, #chooseMoreCat, #chooseMorePr").dialog({ bgiframe: true, autoOpen: false, width: 500, modal: true, open: function(type, data) { $(this).parent().appendTo(jQuery("form:first")); } }); //trigger country dialog $('a.chooseMoreCnt').click(function() { $('#chooseMoreCnt').dialog('open'); return false; }); //trigger category dialog $('a.chooseMoreCat').click(function() { $('#chooseMoreCat').dialog('open'); return false; }); //trigger price dialog $('a.chooseMorePr').click(function() { $('#chooseMorePr').dialog('open'); return false; });

    Read the article

  • How JQuery data validation plugin works on the submit action

    - by kwokwai
    Hi all, I am learning how to use JQuery validation plugin, and came across some questions about the JQuery magic that works on the sumbit action. I got a simple HTML form which has got an input text field like this: <form class="cmxform" id="commentForm" method="get" action=""> <input id="cname" name="name" size="25" class="required" minlength="2" /> <input class="submit" type="submit" value="Submit"/> </form> The magic happened when I tried not to input any data into the field and pressed the submit button. I saw an error message in red pop up, and no matter how hard and how many times I pressed the submit button, nothing was submitted. It seemed that there was some scripts that disabled the submit action, but I just couldn't find which lines of codes in the JQuery Validatyion Plugin that did it.

    Read the article

< Previous Page | 36 37 38 39 40 41 42 43 44 45 46 47  | Next Page >