jquery

Generate XML document in-memory with JavaScript

I am working on a Web application that needs to send XML to a server backend. I'd like to build a XML document in-memory on the client-side, but using XML manipulation routines, instead of appending countless strings together. I'm hoping jQuery can help me out. Let's say I need to generate this (toy) XML document with JavaScript: <repo...

Are there any jquery features to query multi-dimensional arrays in a similar fashion to the DOM?

What the question says... Does jQuery have any methods that will allow you to query a mult-dimensional array of objects in a similar fashion as it does with the DOM. So for instance, get me a list of objects contained within a multi-dimensional array having some matching property value - for instance where StartOfPeriod greater than a ...

passing array to webmethod using ajax

Hi, How to pass an array to webmethod using the following code: $.ajax({ type: "POST", url: "somepage.aspx/somemethod", contentType: "application/json; charset=utf-8", dataType: "json" }); ...

jQuery Animation Speed?

Final Edit: The wall of text below can be summed up by simply asking "can I specify the speed of animations using jQuery's animate()? All that is provided is duration." ~~ jQuery's animate() seems to implement easing despite my use of "linear". How can I get the two boxes to stay together until the first finishes @ 250px? The second...

Jquery - mousedown function with multiple class elements

Hi all, Im super new to Jquery so this may be a quick one. I have a mousedown function on a class named "thumb_resize". I have multiple divs named thumb_resize. So, the first time the mousedown function gets called it works perfectly, but it breaks when I try to call it from another element. Maybe its easier if I show you: http://www....

Need some input on making my Javascript code more efficient and functional

Basically, the code is used to check if 'required form inputs' have been entered before submitting the form. You setup the 'required inputs' by doing: requiredInputs( { 0 : ['name', 'age', ['phone', 'mobile', 'email']] }); The 0 represents the form index on the page. The first two values, name, age, are text boxes that must be ent...

jQuery address plugin -- Not working when content is replaced

I've been using the jQuery address plugin to enable back-button support, which has been working except for when the link is in the AJAX content area. For example <div id="content"> <a href="example.html" rel="address:example.html" onclick="ajaxLoad(this);">link</a> </div> where ajaxLoad replaces content with the content of example....

Auto generate HTML element IDs in Rails when repeating the same control through partials

Hello, I am using partials in Rails combined with jQuery child field templates to dynamically generate forms with multiple nested child attributes. Within these partials is JavaScript that is fired when various events (e.g. onChange) occur in the form, and the code that executes needs to change the DOM for a related but different form el...

How can I execute JavaScript from my code-behind after my UpdatePanel has finished loading its DOM elements?

I have an UpdatePanel with a repeater in it that is re-bound after a user adds an item to it via a modal popup. When they click the button to add a new row to the repeater the code-behind looks something like this: protected void lbtnAddOption_Click(object sender, EventArgs e) { SelectedOption = new Option() { ...

css for disabled radio button

by default, when we put disabled="disabled" for <input type="radio".. . it will turn grey color. what is the css i need to use the change the color ? can i do this instantly with jquery ? ...

Restart an animated GIF from JavaScript without reloading the image

I am creating a slideshow of animations using animated GIFs. I'm crossfading from one animation to the next. The problem is: the only way I have discovered to ensure that the GIF starts animating from the first frame is to reload it each time it's shown. The GIFs are 200KB or so each, which is way too much bandwidth for a continuous slid...

How to customize Tiny MCE jquery version ?

I want to implement and customize Tiny MCE jquery version. Don't know how to :( ...

jQuery filter function playing nice in Firefox but not Chrome

I have an <ul> that if the child img is missing from the <li> it needs to be removed. I am using jQuery 1.4.2. I used: $("#itemList ul li").filter(function() { return $(this).children("img").length == 0; }).remove(); This worked fine Firefox, did not throw any errors. All other major browsers threw an error. Using the following d...

In jQuery, how can I make it so a click function can activate a resizable property.

Let's say I have a div that when it's clicked on it adds the .resizable() function to the div, thus being able to be resized. Would anyone have a code example of this? Thanks!! ...

How to deal with the callback being called multiple times when animating more than one thing in jQuery

Consider this code... $(function() { for (var i = 0; i < 10; i++) { $('body').append('<div style="width: 30px; height: 30px; background: red; margin: 10px;" />') } $('div').slideUp(1000, function() { $('body').append('done sliding'); }); }); (see it on JSbin) It creates 10 divs and then slides them...

Show textarea only when it has some value.

Hello, I have Ajax page where I get search response inside textarea. Here is the code <form onSubmit="checkDomain();return false;" id="ajaxDomainForm" action=""> <input name="domain" type="text" id="domain" onKeyUp="checkForChange();" maxlength="255"> <textarea name="domainsAvailableInput" id="domainsAvailable" readonly="readonly"></t...

In jQuery, how do you use 'this' properly in this situation?

I am confused on why this code is written like this, but I am sure it is important to understand: $.fn.mapImage = function(options){ //Set user input options and defaults var optionConfig = $.extend({}, $.fn.mapImage.defaults, options); image=this; this.image = this; // Assign defaults this.getUrl = optionConfi...

How does the "this" syntax work?

Is this line $(this).attr("id").replace("_button",""); equivalent to this one? this.attr("id").replace("_button",""); ...

speechbubble tooltip using css and jquery

I want to create a Speech-Bubble tooltip using css3 or jquery for one of my websites.How can develop it? ...

build php array using jquery

hi, i have a select box where in it has a list of items and he enters value for each selected option and saves it . i have written a function like. $('.add_recordings').click(function () { if (($('#recordings_name').val() != '') && ($('#recordings_value').val() != '')) { if ($('#recordings').val() == '') { va...