jquery

How do I know if a server has JSONP turned on?

How do I know if a server has JSONP turned on? It is not my server, but I try to access some information from the rendered html. Thanks in advance. ...

Cloning a field with text in it clones text as well?

Hi guys, I have a piece of code that clones three fields, but when it clones the three fields, it also clones the text entered inside of it, is there a way to clear the content inside of the field when it is cloned? $(document).ready(function() { $('#btnAdd').click(function() { var num = $('.clonedSection').length; ...

need a regular expresion to validate started double quote is ended or not

Need a regular expression to validate a double quote(") is started and it must to be ended. Example : "This is valid" but "This is not valid ...

Why is the CSS class and jQuery getting stuck when moving the cursor quickly over targeted selector when using .hover(), .addClass() & .removeClass()?

I created an h1 element that gets a class added to it and removed from it with a duration of 300ms when the mouse hovers over and off of it's containing DIV #logo using jQuery's .hover() method in concert with jQuery UI's .addClass() and .removeClass() methods. It works splendidly but only when the user hovers over #logo and stops to w...

jquery help needed

hi all, I am using autocomplete plugin in my form. I am using this autocomplete feature for a textbox inside a div, which is generated by AJAX, anyway autocomplete feature is working properly...I need your advice after selecting a an autopopulated data from textfield, I need to run a javascript function to take the selected data to fill ...

Cloning a field without cloning the text as well

Hi guys, I have a piece of code that clones three fields, but when it clones the three fields, it also clones the text entered inside of it, is there a way to clear the content inside of the field when it is cloned? $(document).ready(function() { $('#btnAdd').click(function() { var num = $('.clonedSection').length; ...

jQuery remove issue with IE6

I know, I know, IE6 is the devil but I have no choice but to work with it on this project. When I try to remove a parent div it works in every browser except IE (hasn't been checked in other versions yet). Any idea why? - just added some html $('a#remove-product'+i).click(function(event){ $(this).parent('.product').remove(); i--...

google map problem -> google.maps.KmlLayer

Hi, I have a controller (address /Home/Test see below) which definately responds to get request with this: <?xml version="1.0" encoding="utf-8"?><kml xmlns="http://www.opengis.net/kml/2.2"&gt;&lt;Placemark&gt;&lt;name&gt;Simple placemark</name><description>Attached to the ground. Intelligently places itself at the height of ...

JQuery cleaning up eventhandlers

I'm an actionscript developer getting into jquery/javascript development. I have a question regarding event handlers and binding/unbinding. Say for instance that I have for an div with a img element with an onerror event handler in it. If i replace that that div with a new one do i need to remove the eventhandler bound to the img elemen...

How to add a css class-name to a BoundField so that I can find it with jQuery after GridView is rendered?

Hi, I want to add a class name to some of my BoundFields in the GridView control; so that once the GridView is data-bound and rendered I can obtain something like: <td class="Tag1">Some data came from data source </td> The purpose of doing such a thing is to be able to find all the elements that are "Tag1" in this way: var allTag1t...

Is this a valid email address?

"Françoise Lefèvre"@example.com I'm reading RFC 5321 to try to actually understand what constitutes a valid email address -- and I'm probably making this a lot more difficult than it needs to be -- but this has been bugging me. i.e., within a quoted string, any ASCII graphic or space is permitted ...

What is this thing I see in Internet Explorer jQuery1281617118201="24" , jQuery1281617118201="26" on some of my markup ?

Title says it all .. Thanks :) ...

Rails 3.0.0rc - ActiveRecord::Base.class_name

In a Rail 3 project I have a script: <%= javascript_tag do -%> var columns = new Array(); <% for table in @tables -%> <% for column in ActiveRecord::Base.const_get(ActiveRecord::Base.class_name(table)).columns -%> columns.push(new Array('<%= table %>', '<%= column.name %>')); <% end -%> <% end -%> function mergeTab...

How to make AjaxForm work with several forms loaded using jquery load()?

Hi there I have a page with a div that is dynamically filled using a paginator ;-) At page init I load the first 10 forms in it using jquery .load() method. What I'd like to do is to make all the forms dynamically updatable using AjaxForm plugin. I know about server side, let's call it update.asp. It works. But there are several ques...

jQuery smooth mouse tracking

I have my object tracking the mouse using the onmousemove event. But I would like to make it smooth. I'm sure this can't be difficult in jQuery but I'm not finding any really good resources. One idea I had was to simply use the animate function and calculating the offsets that I want to move to. Then if the mouse moves again before the ...

Custom events and who's the sender?

I'm using a component writen in javascript. The component is exposing some events. The problem is I can't figure out who is the sender. They don't provide an instance of the sender as a parameter (like jQuery does). My question is: Is there any way to hook up the event using javascipt/jquery or any other way to get the sender? All I...

Change Table Row background color on Timer Event using jquery

Hi Everyone, Could someone help me please with my problem below? I basically have this markup coming from my JSP. I add class in each row and I want have a blinking effect on each row. <table> <tbody> <tr class="blinkYellow"> <td>Col 1</td> <td>Col 2</td> <td>Col 3</td> </tr> <tr> <td>Col 1</td> <td>Col 2</td> ...

jQuery submit form with AJAX problem

Here is my jQuery code: <script type="text/javascript"> //<!-- $(document).ready(function() { $('input[type="submit"]').click(function() { $.ajax({ type: 'POST', url: $('form').attr('action'), success: function(data) { // } }); ret...

Including variable in jquery selector

Hi there, I have a quick question. I'm matching class names of LI elements to turn on and off divs with a matching ID name, as follows: $("ul#mainnav li").click(function() { $("#mainpages > div").fadeOut(200); var navClass = $(this).attr('class'); var targeted='#'+navClass; $(targeted).fadeIn(200); // thi...

[Jquery] How send "+" sign (add, positive)

Welcome, I'm using jquery to send form, via POST. That's how i'm getting value. var mytext = $("#textareaid").val(); var dataString = 'text='+ mytext; Problem is, i lost somewhere '+' sign... PHP don't get it. But when i print mytext, i can see + sign. I think it's special char and it's removed by jquery. Does anyone have better i...