jquery

Load Tracking Script on Form Submit

I'm trying to load a StatCounter tracking script after the form has been successfully sent. Here's the code: $.ajax({ type: "POST", url: "css/sendmail.php", data: dataString, success: function(data) { $('#script').load('css/script.html', function() ({ $('#overlay').css('visibility','hidden'); clearForm(); $('#...

jQuery + Webkit +... switching between CSS3 transitions/transforms and javascript automatically?

it may sound a weird question not easy also to explain: Jquery works flawless on any desktop web browser but as you may have already noticed is pretty cluncky on iphone/ipad/ipod because is not hardware accelerated as the webkit transforms are...the latter are very smooth...but they work only on apple products. my question is if do you...

Using Jquery and Ajax in ASP.NET

I am using ajax and jquery to load contents into a div. My jquery looks like this $("a.trigger").click(function() { $.ajax({ type: "POST", url: "GetStuff.aspx", data: "id=0", success: function(response){ $("#contentDiv").html(response); } }); }); In GetStuff.aspx I would like to write s...

Problem about using Flot + JQuery in Android

Has anyone already used Flot in Android? I've been reading this http://rapidandroid.org/wiki/Graphing and i've re-used a code that i had that is working on a web site. The problem is that the graphic doesn't render. Something like this: -------------- JAVASCRIPT THAT GETS THE DATA -------------------- if ($('#newsStatsCheckbox'...

i am getting this error when I am trying to get maximum number of rows from database to jsongrid

Server Error in '/' Application. Error during serialization or deserialization using the JSON JavaScriptSerializer. The length of the string exceeds the value set on the maxJsonLength property. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information ...

jQuery / Javascript - How do I convert a pixel value (20px) to a number value (20)

I know jQuery has a helper method for parsing unit strings into numbers. What is the jQuery method to do this? var a = "20px"; var b = 20; var c = $.parseMethod(a) + b; ...

jQuery .load from another page that contains Javascript

I've been using jQuery .load() to load content into a div. The content being .loaded occasionally has a document.ready() function which is called, and works, correctly (i.e. the ready() function is called). However, when I use an element ID in the .load(), such as: .load ("test.php #content"), the Javascript is no longer executed even...

find xml element by attribute

Using JQuery or Javascript how would I return 'Mary Boone' from the xml below starting out with the show 'id' attribute of '2'? I'm thinking something along the lines of - var result = xml.getElementByAttribute("2").gallery.text(); the XML: <shows> <show id="1"> <artist>Andreas Gursky</artist> <gallery>Matthew M...

How do I iterate through child elements of a div using jQuery?

I have a div and it has several input elements in it... I'd like to iterate through each of those elements. Ideas? ...

jquery, ajax, load post result to div

Hello, I have a form that I need to post and show the result in a div. I'm not having any problems making the ajax call but I can't seem to figure out how to load the result to a div. I have tried: $.ajax({ type: 'POST', data: $('#someForm').serialize(), url: 'http://somedomain.com/my/url', success: function(data) { ...

jQuery Validation: abstracting rules

Im using jQuery's validation which can be found here: http://docs.jquery.com/Plugins/Validation/rules#.22add.22rules I currently have some of my 'custom' rules set up like so: else if(valID =="#shipForm") { $("#fName").rules("add",{regexName: "^[a-zA-Z]+(([\'\-][a-zA-Z])?[a-zA-Z]*)*$",minlength: 2,messages:{minleng...

Xml Parsing with JQuery Issue

Hi, can anyone help me with this XML parsing issue? My xml is: <?xml version="1.0" encoding="utf-8"?> <shop title="ramesh"> <raj title="title">name</raj> </shop> My jquery is : $(function(){ $.get("shop.xml", function(data){ var shopInfo = $(data).find("shop").attr('title'); var showowner = $(data).find("raj")...

How does one close an overlay by clicking outside of the overlay?

I have a jquery drop down that activates and deactivates when you click the header for the drop down $j('#category_header').click(function() { $j('#category_dropdown').slideToggle("fast"); return false; }); but I want it to also close when I click anywhere on the page that isnt the drop down. How do I go about doing that? ...

Sortable clone helper not working

Maybe I don't understand how clone works with sortable, but here is what I would like to do. When sorting an item I would like a clone of the item I am dragging remain until I stop drop the item in its new position. Here's the code: <html> <head> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4....

Ajax call file or files

I have a module setup that uses ajax calls, should I have one file for all my ajax calls or should all the calls have their own file? Example of what I mean: index.php ------ With the ajax calls Should I have one file such as 'ajax.php' that has functions for update, delete, and edit. Or should I have update.php, delete.php, and edit....

Why build Javascript functions as jQuery plugins?

I've seen alot of jQuery implementations of existent JavaScript functions that merely wrap the JavaScript code in a jQuery wrapper and don't actually rely on any of jQuery's base for their operation. What are the benefits of using Javascript as a jQuery plugin? If there are none is there a speed loss to use a jQuery plugin that could...

What's the difference between UI development and front-end development?

I'm a front-end developer and really enjoy jQuery and JavaScript. I've built a lot a websites, done some good jQuery work and built a few JavaScript based applications and would really like to get in UI development. Or so I thought. I guessed it would be pretty similar to what I already do except maybe a little more JavaScript heavy bu...

jquery :first selector loop problem

$(".wrap table tr:first").addClass("tr-top"); it works for the first table, but i have many tables under the div .wrap. what should i do? thanks! ...

asp.net mvc, IIS 6 vs IIS7.5, and integrated windows authentication causing javascript errors?

This is a very strange one. I have an asp.net MVC 1 app. Under IIS6, with no anon access - only integrated windows auth - every thing works fine. I have the following on most of my Foo pages: <% using (Html.BeginForm()) { %> Show All: <%= Html.CheckBox("showAll", new { onClick = "$(this).parent('form:first').submit();" })%...

click event in jQuery question

I have 2 click event functions that are practically identical... one works and the other doesn't. // click event on buddy in #chatpanel $('#chatpanel a.buddy').click(function() { // if a chat window is already active, close it and deactivate $('#mainpanel li[class="active-buddy-tab"]').removeClass('active-buddy-tab').addClass('b...