jquery

Javascript Reference Comprehension

I have been learning some of the more detailed loopholes of JS here and there, and have a few things I need to get help on. ;(function($){ $.fn.makeRed1 = function() { return $.each(this, function() { $(this).css('background-color', '#FF0000'); }); } })(jQuery) ;(function($){ $.fn.makeRed2 = fun...

ajax post for django template

HI all, I have a problem when i want to submit value then full page again reload. I want to update my table with asynchronous call, that specific information will be loaded but full page not... plz help me aboput this...thanks ...

Accessing a inner div value in javascript, with no ids to help

I have following structure <div onClick="javascript:Myfunction('value');"> <div title="Mytitle"> </div> </div> Can I access in the javascript Myfunction, the title of the inner div. There are no ids here. ...

How can I remove jquery from the frontside of my WordPress?

hi there, My wordpress site is a bit heavy to download. On the frontend, its including jquery unnecessarily. In my firebug it looks like: jquery.js?ver=1.3.2 and jquery.form.js?ver=2.02m I don't need these to be included for me. I'm happy for them to remain in the wp-admin, but I'd like them not to load on the frontend. I have found...

jQuery dynamic creation of input fields based on the number selected in a dropdown menu?

I am trying to accomplish something along the lines of this: http://devblog.jasonhuck.com/assets/infiniteformrows.html But... I want to display a dropdown select field, with values 1 to 20, and depending on which value gets selected in that field that's how many input fields I will display to a user to fill out on the page (without ref...

Jquery: Prebuilding in memory

Similar to this question: http://stackoverflow.com/questions/337352/jquery-build-html-in-memory-rather-than-dom I have a var $container = $("#container"); I also have: jQuery.fn.somedomedits = function(expr) { return this.each(function() { var $self = $(this); $self.find(".adsf").append("<div></div>"); // A lot m...

Force refresh on ajax request?

I have a script which at one point returns an image thumbnail using jquery built in java request. Every time the php function get called, this thumbnail gets updated, but keeps the exact same filename. Problem is that the browser caches the thumbnail and it looks like it never gets updated. Are here any techniques to avoid this? ...

jQuery Custom Scroll Plugin

I want to develop a jQuery plugin that instead of having scrollbars, it instead has scroll "buttons" on the top and button of a container. The container itself is just an unordered list as a menu on the left hand side of the page, but I also need to calculate when it needs to scroll. The user can resize the browser, but the menu is fix...

jquery javascript module architecture on a website

I want to write a module on one html site - I will never leave the site I think about two possible concurrent basic approaches: We go into the module by use only a specific function (with specific params - everything which will happen, happen there - logic, exception handling etc) We go in by using one handler-fct, which manages some ...

Problem with jquery in IE8

I have the following code which opens and closes a specific div when a button is pressed using jquery I did not use toggle as I also needed to close all the other divs in the same group. $("#login-link").click(function(){ if ($("#login").is(":visible")){ $("#login-link").attr("src", "resources/images/menu/login.gif"); $(...

use jquery to animate lines of text

I have a paragragh of text. <p> line1 line2 line3 </p> intially all the text are red when a button is pressed each line's color changes to black gradually (2 sec each line) can this be done with only jquery? ...

Executing next line after completion of code in Ajax in Jquery

Need Help! I am executing an ajax call inside a function. The result from the Ajax call is the return value of the function. The code is as follows: function tabstrip() { $.ajax({ type: "POST", url: "/WebService/MessageUnratedCount.asmx/GetMessageUnratedCount", data...

How do I use Jquery UI Tabs constructor methods?

Hi I am using Asp.net MVC and I been trying to use Ajax UI tabs in jquery. On the demo site: http://jqueryui.com/demos/tabs/#ajax It has this Fetch external content via Ajax for the tabs by setting an href value in the tab links. While the Ajax request is waiting for a response, the tab label changes to say "Loading...", ...

JQuery: Prevent fadeOut when form has focused or when dialogue is moused over.

The title is a little vague, but I can't explain it in the character limit. I'm creating a little splash screen with dialogues that appear as you hover over certain triggering links. Two of these contain forms (log-in prompt and a registration form). At present, if you hover over either the link or the dialogues themselves they remain a...

jQuery $this vs $(this) in plugin development

I was wondering why in so many jquery plugins $(this) is set to be pointing at $this, here is an example, if i have the following two plugins included on a page: (function($) { jQuery.fn.pluginOne = function() { return this.each(function() { $this = $(this); <-- alert($this); }); }; })(jQuery) (funct...

jQuery and other libraries, and the usage of '$'

I have a quick, beginners-type-question. If I were to use jQuery and some other framework, would the following statement be problematic: jQuery(document).ready(function () { $("input[name='password']").focus(function () { $("input[value='login']").attr("checked", "checked"); }); }); That is, the use of '$' within the ....

How to prevent external JS to block your site from loading?

Hi, how do I prevent slow loading external js files from blocking the loading process of the whole website (because the browser processes 2 requests only at a time)? Let's say I want to include the sharethis button but the server is encountering heavy load and needs to long to serve my request, how can I force the rest to load anyway. ...

mask for one digit and two digit

Hi, I have been using this $("#SomeId").mask("99"); jquery mask for text box where I want to enter only two digit numbers, but i do not know which mask to put in order to enable entering only one digit number and two digit. From 0-99 with mask above I cannot enter one digit number, the text box become blank when it lose focus. Can a...

Four variations of jQuery ready() -- what's the difference?

I've seen four different ways to tell jQuery to execute a function when the document is ready. Are these all equivalent? $(document).ready(function () { alert('$(document).ready()'); }); $().ready(function () { alert('$().ready()'); }); $(function () { alert('$()'); }); jQuery(function ($) { alert('jQuery()'); }); ...

jQuery Change event on an <input> element - any way to retain previous value?

I've been searching around this morning and I'm not finding any simple solutions... basically, I want to capture a change in an input element, but also know the previous value. Here's a change event and an input element in its simplest form. Clearly, I can get the new value with $(elem).val(), but is there a sneaky method I'm missing f...