jquery

Disable buttons on post back using jquery in .net app

I have a asp.net app that I want to disable the buttons as soon as they are clicked in order to prevent multiple submissions. I'd like to use jquery for this as the site already liberally uses it anyway. What I've tried is: $(document).ready(function () { $("#aspnetForm").submit(function () { $('input[type=submit]', $(this...

HTML5 Video Stop onClose

I'm using jQuery tools for an overlay. Inside the overlay I have an HTML5 video. However, when I close the overlay, the video keeps playing. Any idea how I might get the video to stop when I close the overlay? Here's the code I have: $("img[rel]").overlay({ onClose: function() { <stop the video somehow> }, mask: { color: '#000', opacity...

How can I send null value?

I want to do something like this $.get('/Controller/Action/', { model : null }, function(data) {}); Unfortunatelly it doesn't work. In server side the value of the model is {object}. How do I get null? EDIT --- Javascript --- var json = JSON.stringify({ model: null }); $.get('/Controller/Action/', json, function (data) { }); -...

jQuery - Iframe validation - cannot get values

See demo: http://tinyurl.com/3xow97t The editor is under development. Now we check if it has an value - this works well with all form fields that have the class .required... but it does not work with the iframe. the iframe has a div with id #content. $('form .meet').focus(function() { $('iframe').each(function() { ** if($(this...

jQuery::Ajax success never occurs

I have an ajax call in the head section of my index.html $(function() { alert("Hello, World!"); $.ajax({ method: 'get', url : 'php/getRecord.php?color=red', dataType: "json", success: function (data) { alert(data); } }); }); For some reason, that alert(data) never gets called but the "Hello, World...

How to make div clickable?

I want to make this div click-able and want to use same href of inside <a> and want to keep link in inside <a> also (so if JS is disabled then link will be accessible). <div id="example"> <p> some text </p> <img src="example.jpg /> <a href="http://stackoverflow.com"&gt; link </link> </div> I mean i need like this. <div id="exampl...

How to get html of matched element in jquery

I have this html <div id"test123"> dasd'asdasd </div> I want the content of that div box with "<div id="test123">" itself as well not just innerhtml I tried $('#test123').html() But it only gave me inner html ...

AjaxSubmit File Upload - Trying to get response $(document).ready() to fire

I'm using the jquery form plugin (http://malsup.com/jquery/form/) to upload a file via ajax which is processed in the background. The upload is working correctly, and I am using ASP.Net MVC to return a partial view which contains a $(document).ready call to setup a 'timer' to check on the status of the upload file's processing status....

How to get the nearest element node(parent) for a text node in jQuery?

in jquery thanks. ...

jquerycropping,codiegniter,php

I want to crop the image using jquery,codigniter in jquery i get four coordinate of image x1=249 x2=326 y1=194 y2=271 w=77 h=77 in codiegniter done the query function do_crop() { $x=249; $y=194; $w=77; $h=77; $path= 'system/application/'; $...

Link doesn't let animation to end JQUERY

I create a div that when is clicked it executes an jquery script, but the problem I have is that in the animation there is a link, when you click on the link the links is execute as well as the animation but it does not let the animation to end. Is there a way to let know Jquery that when the links its executed wait for the animation to ...

Loading scripts using jQuery

$.ajax({ url: "plugin.js", dataType: 'script', cache: true, success: function() { alert('loaded'); }}); 1) I can't get the script to load, probably due to incorrect path, but how do I determine the correct path? The above code is in init.js, plugin.js is also in the same folder. 2) Can I load multiple plugins at once with the same...

jQuery DataTables plugin -- adding a custom option select filter

Anyone know how to add a custom option select filter to a jQuery DataTable? Basically, like this example page but instead of having min/max text fields... change them to select options. ...

Ie ignore javascript files or code in general

In css when you want something to be ie only you can comment it out and assign ie. I have a jquery plugin that breaks in IE I don't want it to run in ie but I want it to run in all other browsers. How can I do this? this worked! jQuery(function() { if(jQuery.browser.msie){} else {$('.div').corner("round 20px");}; }); ...

jquery how to access the an xml node by index?

Hi, say I've an xml returned from server like this: <persons> <person> <firstname>Jon</firstname> </person> <person> <firstname>Jack</firstname> </person> <person> <firstname>James</firstname> </person> </persons> If I want to access the 3rd ...

jQuery event binding does not work properly or i can't make it properly working

HTML: <input id="email" name="email" type=text /> <input id="password name="password" type="password" /> JavaScript: var fields = ["email","password"]; for (var i in fields) { var field = $("#"+fields[i]); field.bind({ focus: function() { field.css("border-color","#f00"); }, blur: function(...

ajax partial load from another page

So what I want to do is load only a section of one webpage onto another page. So I want to grab the content of a page (stuff inbetween a div with a certain id) without the headers and footers. I know I've seen this before but its, stangly, a hard thing to find. Anyone kind enough to point me in the right direction? thank you ...

Add delay and focus for a dead simple accordion jquery

I found the code somewhere in the world, and due to its dead simple nature, I found some things in need to fix, like when hovering the trigger, the content is jumping up down before it settled. I have tried to change the trigger from the title of the accordion block to the whole accordion block to no use. I need help to add a delay and...

How do I change the animation style of a jQuery Accordion?

Hi there. Is there a way to change the default animation that jQuery accordion uses? It appears to be "slide" but I'd like to use a Bounce or Drop effect. Here's my current code: $("#accordion").accordion({ autoHeight: false, collapsible: true, event: 'click', active: 4 }); I'd like to change this from a slide to a drop or a bounce....

validation before ajax form submission

How do i introduce validation before remote_form_for submits? I have javascript function called validateForm(). I am able to call it before the AJAX request process. I tried to use return false and event.preventDefault. But there seems to be no effect. Here is what my code looks like <% remote_form_for :customer, :update =>"uxScreenLoa...