jquery

Is data.success javascript, jquery or json?

I googled data.success, but I could not proper document. What is data.success in the following jquery? Is it javascript, jquery or json? function remove_row(data){ if(!data.success) return alert(data.error); $('#delete_link_'+data.id) .closest('li') .slideUp('slow',function(){ $(this).remove(); }); --E...

jQuery cancelling and resetting slide animations

I'm writing some jQuery for toggling divs that, in pseudo code, should do the following: item.click check to see if the div I want to expand is hidden if so slideup all of the divs when finished... slide down the one I want to expose There are multiple items that can be clicked (in this particular case,...

jQuery - Getting XML data passed as an option to a plugin

This is someone elses code that I am trying to understand and modify... The basics are that I am trying to get some XML and load it into a custom plugin. I have something like the following (the PHP page being hit takes the dothis property and switches based on it, returning either an integer or the actual XML): (function() { var Cou...

In ASP.Net MVC, can ModelState be used with an ajax update?

This is a follow up to a previous question that I had before about passing an error back to the client, but also pertains to the ModelState. Has anyone successful used the Nerd Dinner approach, but with Ajax? So Nerd Dinner does an update as so. [AcceptVerbs(HttpVerbs.Post)] public ActionResult Edit(int id, FormCollection formValue...

Swap a class of an <li> on click

I am trying to swap the selected class from tab to tab to display which one is current Sample Code $("li.selected").idTabs(function(id,list,set){ $("a",set).removeClass("selected") .filter("[@href='"+id+"']",set).addClass("selected"); for(i in list) $(list[i]).hide(); $(id).fadeIn(); return false; }); so on click I am trying...

jQuery - "Drop-Up" Menu

Hi there! Anyone knows a jQuery menu plugin that allows that the render of menu is drop-up instead of drop-down? Thanks in advance for the help, Best regards! ...

Javascript JQuery link to download a txt file

Hi guys, Is there a way to 'force' the browser to download a file instead of opening that? <a href="file.txt">Download this file</a> I've tried the method via js using the window.open("file.txt", "Download"); but no success. Thx. Updating: I've done a php file as follow; <html> <a href='dl.php?bid=3'> <php> $sql="select barqui...

Issue with Django form when submitted using jQuery form plugin

hi, when submitting my form using jQuery form plugin, the request received by the target view is different than that received when the form is submitted in the standard way (with no javascript), and my Django template does not render as expected. When submitted in the standard way, the template renders the form errors (the "form.[field_...

Writing to a file

I am extracting content from a web page using JS/JQuery and want to write the data to a comma separated file. I know javascript doesn't really support file io and I'm trying to avoid setting up a local apache server just to process the content to a file. Is there an easier way to do this? ...

mouseleave event not firing when moving over child Flash movie

I'm trying to get some rollovers to work, but I'm running into a mouseleave problem. Everything is working, except there is a Flash movie that is near the top of one of the rollover targets. When the mouse leaves by moving off the top of the element, the event doesn't fire because it's leaving the element directly from the Flash movie. ...

Display the Google Map on the JQuery UI Dilog?

i am new to the JQuery Development and MVC, i have an ascx file Which Displays the map and Locate Some Points on it comming from the Controller. if i Open this ascx file as a pop up window my screen is working Fine. if i call as a JQuery Dilog (Through the Ajax Call) it is Not calling the mapdisplay method because it is in the document.r...

Validating Problem - Doesn't work in IE

I'm using following Code to add status-messages via PHP & Javascript (Ajax): $(document).ready(function(){ $("form#status_form").submit(function(){ var s_autor = $('#s_autor').attr('value'); var s_status = $('#s_status').attr('value'); $.ajax({ type: "POST", url: "/request.php", data: "s_autor="+ s_a...

jQuery Validate Custom Rule Ignore a Checkbox

With some help from other post the related to validating multiple checkboxes, I decided to go with this customer rul $.validator.addMethod("checkBox", function(value, element) { return $("input[type=checkbox]:checked").length > 0; }, ""); I then call this in the rules section: field_name:{checkBox:true} This works great for ma...

how to disable a dropdown item after its been selected

i have a regular combobox and i am listening to the change event and sticking the selected value in an html table. this all works fine but there is one issue. Right now, the user can select the same item more than once (which i dont want to allow). At the point of where an item is selected, i want to: Capture the value and stick it ...

jQuery: Insert text to textarea

How can i utilize jQuery to insert text at the cursor into a textarea. ...

Problem with PNG Fix for 2 overlapping images

Hi I am using PNG FIx module in Drupal for 2 overlapping images on which I have applied some jquery effect. The Problem is that when I use the PNG fix module then in IE I start seeing 2 images placed side by side instead of overlapping each other. Is there any solution to this problem ? Please Suggest. Thanks ...

Jquery - slideleft, code not working?

Title is descriptive, what is wrong with this code and why? <script type="text/javascript"> $(document).ready(function() { $('#slideleft').mouseenter(function() { var $lefty = $(this).next(); $lefty.animate({ left: "-2000px" }, 500 ); }); }); </script> HTML <div id="slideleft" class="slide"> <...

Selecting radio button option based on keyboard input

I have a page full of radio buttons that I'd like to be able to tab through and then select options based on keyboard input. I'm hoping to get the keyboard input to work on radiobuttons in a similar way to how it works on dropdowns (typing the letter 'G' will automatically select the first option that starts with a 'G') Is there a jque...

Own jQuery template

Hello, how could I create my own jQuery UI template? For example for the the accordion I want to have another HTML markup structure, how could I do that? ...

Should I use jQuery.each()?

I'm doing very frequent iterations over arrays of objects and have been using jQuery.each(). However, I'm having speed and memory issues and one of the most called methods according to my profiler is jQuery.each(). What's the word on the street about its performance? Should I switch to a simple for loop? Of course I'm fixing the many iss...