Search Results

Search found 23364 results on 935 pages for 'jquery ui droppable'.

Page 48/935 | < Previous Page | 44 45 46 47 48 49 50 51 52 53 54 55  | Next Page >

  • jquery validate - validating a field on pageload

    - by boz
    Hi there, I've got an input field on my plain html form that I would like to be marked as invalid (and the error message shown) from the moment the page loads. Is this possible to do with the jquery validate plugin? Failing that, how can I hide an element when the plugin tries to validate a particular input field?

    Read the article

  • Why is jQuery .load() firing twice?

    - by LeslieOA
    Hello S-O. I'm using jQuery 1.4 with jQuery History and trying to figure out why Firebug/Web Inspector are showing 2 XHR GET requests on each page load (double that amount when visiting my sites homepage (/ or /#). e.g. Visit this (or any) page with Firebug enabled. Here's the edited/relevant code (see full source): - $(document).ready(function() { $('body').delegate('a', 'click', function(e) { var hash = this.href; if (hash.indexOf(window.location.hostname) > 0) { /* Internal */ hash = hash.substr((window.location.protocol+'//'+window.location.host+'/').length); $.historyLoad(hash); return false; } else if (hash.indexOf(window.location.hostname) == -1) { /* External */ window.open(hash); return false; } else { /* Nothing to do */ } }); $.historyInit(function(hash) { $('#loading').remove(); $('#container').append('<span id="loading">Loading...</span>'); $('#ajax').animate({height: 'hide'}, 'fast', 'swing', function() { $('#page').empty(); $('#loading').fadeIn('fast'); if (hash == '') { /* Index */ $('#ajax').load('/ #ajax','', function() { ajaxLoad(); }); } else { $('#ajax').load(hash + ' #ajax', '', function(responseText, textStatus, XMLHttpRequest) { switch (XMLHttpRequest.status) { case 200: ajaxLoad(); break; case 404: $('#ajax').load('/404 #ajax','', ajaxLoad); break; // Default 404 default: alert('We\'re experiencing technical difficulties. Try refreshing.'); break; } }); } }); // $('#ajax') }); // historyInit() function ajaxLoad() { $('#loading').fadeOut('fast', function() { $(this).remove(); $('#ajax').animate({height: 'show', opacity: '1'}, 'fast', 'swing'); }); } }); A few notes that may be helpful: - Using WordPress with default/standard .htaccess I'm redirecting /links-like/this to /#links-like/this via JavaScript only (PE) I'm achieving the above with window.location.replace(addr); and not window.location=addr; Feel free to visit my site if needed. Thanks in advanced.

    Read the article

  • jQuery animate callback - doesn't complete, no callback?

    - by Mark
    This jsbin demonstrates my problem: http://jsbin.com/aqute4/edit I'm using jQuery animate to kick down some non-css properties ala: http://james.padolsey.com/javascript/fun-with-jquerys-animate/ However, the animate gets very close to the final number, but never actually reaches it! The callback doesn't happen. I need the callback to run. Thanks in advance!

    Read the article

  • jQuery Ajax (beforeSend and complete) working properly on FireFox but not on IE8 and Chrome

    - by Farhan Zia
    I am using jQuery ajax version 1.4.1 in my MVC application (though the issue I am discussing was same with the old jQuery version 3.2.1) as well, to check during customer registration if the username is already registered. As the user clicks on the "Check Availibility" button, I am showing a busy image in place of the check button (actually hiding the check button and showing the image) while checking the availibility on the server and then displaying a message. It is a Sync call (async: false) and I used beforeSend: and complete: to show and hide the busy image and the check button. This thing is working well on Firefox but in IE 8 and Chrome, neither the busy image appear nor the check button hides rather the check button remained pressed as the whole thing has hanged. The available and not available messages appear correctly though. Below is the code: HTML in a User Control (ascx): (i have replaced the angular braces with square below) [div id="available"]This Username is Available [div id="not_available"]This Username is not available [input id="txtUsername" name="txtUsername" type="text" size="50" /]  [button id="check" name="check" type="button"]Check Availability[/button] [img id="busy" src="/Content/Images/busy.gif" /] On the top of this user control, I am linking an external javascript file that has the following code: $(document).ready(function() { $('img#busy').hide(); $('div#available').hide(); $('div#not_available').hide(); $("button#check").click(function() { var available = checkUsername($("input#txtUsername").val()); if (available == "1") { $("div#available").show(); $("div#not_available").hide(); } else { $("div#available").hide(); $("div#not_available").show(); } }); }); function checkUsername(username) { $.ajax({ type: "POST", url: "/SomeController/SomeAction", data: { "id": username }, timeout: 3000, async: false, beforeSend: function() { $("button#check").hide(); $("img#busy").show(); }, complete: function() { $("button#check").show(); $("img#busy").hide(); }, cache: false, success: function(result) { return result; }, error: function(error) { $("img#busy").hide(); $("button#check").show(); alert("Some problems have occured. Please try again later: " + error); } }); }

    Read the article

  • Jquery inside Facebox

    - by dakemz
    I have facebox setup and it works. when I load an external page with a tab based navigation (JQuery too) the modal works but the nav doesnt. If it isnt clear I actually want the tabs to be inside the lightbox. And I also have php/mysql running inside the lightbox if that can change anything. Thanks for any help.

    Read the article

  • jQuery .load() wait till content is loaded

    - by user1785870
    How to prevent jQuery $('body').load('something.php'); from changing any DOM till all the content from something.php (including images,js) is fully loaded -Lets say some actual content is: Hello world And something.php content is: image that loads for 10 seconds 20 js plugins After firing .load() function nothing should happen, till images an js files are fully loaded, and THEN instantly change the content. some preloader may appear, but its not subject of question.

    Read the article

  • Extending Jquery validate to show/hide div or clear div after validate is ran

    - by Shawn
    Right now i have all of my errors outputting to a div. Id like to catch the validate event and clear the div right before its ran of my old errors. Then id like to show/hide that div based on if it has any labels in it that were auto generated by the jquery validation plugin. I can do everything but figure out how to extend the event, run the stuff i need to, then call the validate function. Thanks!

    Read the article

  • Zen Code + jQuery

    - by Josh Cornstone
    Hi, I just read this article at Smashing Magazine (http://www.smashingmagazine.com/2009/11/21/zen-coding-a-new-way-to-write-html-code/) about Zen Code. Maybe there is any jQuery plugin for this? Might be good for json data inserting/templating.

    Read the article

  • Jquery request download/open file to the user

    - by CoffeeCode
    I have a Url that returns a file. How should my jquery request looklike to download this file to the user?? the action method looks like this public FileContentResult GetFile(int Id) { if (Id == 0) return File(new byte[0], ""); Survey survey = Repository.GetItem(Id); return File(survey.File.FileContent.ToArray(), survey.File.ContentType, survey.File.Name); }

    Read the article

  • jQuery Validate Required Select

    - by Idsa
    I am trying to validate html select element using jQuery Validate plugin. I set "required" rule to true but it always passes validation because zero index is chosed by default. Is there any way to define empty value that is used by required rule?

    Read the article

  • jQuery delegates with plugins

    - by Daniil Harik
    Hello, jQuery delegates are great, especially when using with table row click events. I was wondering if it's possible to use delegates with plug-ins as well? For example if I attach elastic plug-in to every text area, I would do: $("textarea").elastic(); But how would I attach this plug-in using delegate?

    Read the article

  • jQuery plugin validate() : apply plugin to ajax injected form

    - by pixelboy
    My issue here is quite simple : i'm trying to use the jQuery validate plugin to a form that gets injected after certain user actions. My problem mostly is that : I could use live support to bind the change event over inputs, like this $("#adresseLivraisonPro").live('change',function(e){ $("#adresseLivraisonPro").validate({ But this makes my form validated if and only if user changes inputs... How would you surround that problem ?

    Read the article

  • Adding Previous/Next Functionality to jQuery Map Highlight Plugin

    - by Keith
    As you can see in my jsFiddle example, I have a diagram that uses jQuery Map Highlight plugin to allow users to click to different parts of the diagram and see the corresponding text to the left. Right now, the only way to interact with the diagram is by clicking on it. I'd like to give users the ability to hit previous and next buttons to control it as well. I'm just not sure how to go about it. Any help would be appreciated: http://jsfiddle.net/keith/jkLH7/1/

    Read the article

  • jquery live tabIndex

    - by VictorS
    I have a jQuery statement that's working fine. How would I re-write it in .live? $(document).ready(function() { $(':input:enabled:visible, a:enabled:visible, span.ValidatorClass').each (function(i, e) { $(e).attr('tabindex', i) }); }); The reason I need this is that I am doing .show and .hide sometimes and need to reset tab order when that happens for the elements that appear.

    Read the article

  • jQuery Grid Recommendations

    - by Wilco
    What are the most recommended jQuery grid plugins out there? I've been messing around with Flexigrid which seems to be fairly decent. Are there any other noteworthy ones out there I should be looking at?

    Read the article

  • jQuery.ajax(): discard slow requests

    - by Thomas
    I've build a livesearch with the jQuery.ajax() method. On every keyup events it receives new result data from the server. The problem is, when I'm typing very fast, e.g. "foobar" and the GET request of "fooba" requires more time than the "foobar" request, the results of "fooba" are shown. To handle this with the timeout parameter is impossible, I think. Has anyone an idea how to solve this?

    Read the article

  • How to merge jquery autocomplete and fcbkListSelection functionality?

    - by Ben
    Initial caveat: I am a newbie to jquery and javascript. I started using the autocomplete jquery plugin recently from bassistance.de. Yesterday, I found the fcbkListSelection plugin (http://www.emposha.com/javascript/fcbklistselection-like-facebook-friends-selector.html) and am using it to include a selector in my application. What I now want to do is to merge the 2 pieces of functionality since there are lots of items in my selector list. To be more specific, I want to put a "Filter by Name" text box above the facebook list selection object in my html. When the user types a few characters into the "Filter by Name" text box, I want the items in the Facebook list selector to only show the items that contain the typed characters -- kind of like what autocomplete does already, but rather than the results showing below the text input box, I want them to dynamically update the facebook list object. Is this possible and relatively straightforward? If so, can somebody please describe how to do it? If not, is there an easier way to approach this? Thanks! OK, to Spencer Ruport's comment, I guess I may have a more specific question already. Below is the current Javascript in my HTML file (angle brackets represent Django tags). #suggest1 and #fcbklist both do their separate pieces, but how do I get them to talk to each other? Do I need to further write javascript in my HTML file, or do I need to customize the guts of the plugins' .js? Does this help elaborate? $(document).ready(function() { var names = []; var count = 0; {% for a, b, c in friends_for_picker %} names[count] = "{{ b }}"; count = count+1; {% endfor %} function findValueCallback(event, data, formatted) { $("<li>").html( !data ? "No match!" : "Selected: " + formatted).appendTo("#result"); } function formatItem(row) { return row[0] + " (<strong>id: " + row[1] + "</strong>)"; } function formatResult(row) { return row[0].replace(/(<.+?>)/gi, ''); } $("#suggest1").autocomplete(names, { multiple: true, mustMatch: false, autoFill: true, matchContains: true, }); //id(ul id),width,height(element height),row(elements in row) $.fcbkListSelection("#fcbklist","575","50","4"); });

    Read the article

  • jQuery validatoin plugin - site wide settings

    - by Daveo
    I want to have site wide default settings for all jQuery validation uses on my site, I want every form to use the below settings, but then on a per form basis change the rules and messages. Is this possible? $('#myForm').validate({ errorClass: 'field-validation-error', errorElement: 'span', errorPlacement: function(error, element) { element.next('span').remove(); error.insertAfter( element ) .removeClass('field-validation-error') .addClass('ui-state-error'); }, success: function(label) { label.remove(); } });

    Read the article

< Previous Page | 44 45 46 47 48 49 50 51 52 53 54 55  | Next Page >