jquery

how to use "this" in this jquery function

Hi folks. I am trying to write a function where I need to reference "this" inside of window.setTimeout. Currently it doesn't work. How can I rewrite this so it works? Thanks. $(function() { $('li a').click(function() { $(this).parent().css('background-position','left top'); window.setTimeout("$(this).css('fon...

Switching a Map using AJAX tabs - Google Maps API

I'm trying to setup Google Maps using the Google Maps API v3 JS code. I've got multiple tabs that when clicked open up an AJAXed page of content without reloading the original page. Each tabbed content contains a map. Below is an example of how I've got the map setup. Please note, the list element here is just an example, each tab contai...

JQuery conditional click events

Hello, I have an unordered list of elements organized in rows. When a user clicks on a row, I want the text in the row to be appended into a separate text field. The issue with my current code is that I if the user clicks multiple boxes, all of the associated text with each of those boxes will be appended into the textfield. I would lik...

jquery popup registration form

I am using the following code for popping up a registration form. http://yensdesign.com/2008/09/how-to-create-a-stunning-and-smooth-popup-using-jquery/ I created a registration form inside the popup box and when i submit it i am redirected to a new page. I am no longer inside the popup. Please let me know how to avoid going out of the...

Testing On Page Load Function

How do make sure that my $(document).ready( function() { ... } ) block executes? ...

Is there a way to add a case sensitive attribute using jQuery?

I'm working with jQuery to modify some svg files data on the fly... one of the things I need to do is modify the "viewBox" attribute. When using jQuery as in the snippet below, however, it is doing a toLower() on the attribute so "viewBox" becomes "viewbox". Normally I wouldn't care but this seems to break svg rendering (at least on Ma...

Calling two types of jquery - issue in IE

Firefox works fine, Opera is great and Chrome works well also. IE is the issue. It seems to be ANY version of IE. The site is http://s91532.gridserver.com and no matter where you click, it brings down our javascript menu from the top. When you hover over the images it shows you the correct path and everything but when you click it just...

How to delay Jquery UIBlock Plugin?

Hi I am using this plugin. http://jquery.malsup.com/block/#overview However I would like this blockUI to only show up say if the ajax request goes more than 1second. If no show nothing. Is there a way I can do this? ...

How to make Javascript object available outside function?

I am retrieving some JSON data with the following function. It is called when an element is clicked and the data is used to create a table, populate the cells with images and append the table to a div. function LoadImagesByCategory() { $.getJSON("/Service/GetJson.ashx?data=images", function(data) { jsObjectData = data.ImageC...

jQuery tipsy plugin - DelayIn not working

I just added jquery tipsy plug-in to my site and I cant seem to get it working properly! It fades in just fine and the html works fine, but the delay doesn't happen. Here is the code I am using: $(document).ready(function() { $('#navi li a').tipsy({delayIn: 500, fade: true, html: true}); }) Has anyone ever encountered this problem? ...

Basic Help with SimpleModal and ASP.NET

Integrating SimpleModal with ASP.NET I want to thank Eric for producing SimpleModal and compliment the demos. It looks fantastic.. I only wish I could figure out how to use it.. (it's me, I'm missing some chromosome or something.) Sorry in advance for my noobinicity. I've seen several demos where specific functions are talked about an...

jQuery .addClass does not change css

Ideally I want to hover over my <li> in my menu and highlight each <li> but as a test I have the following to change the class on hover. Any thoughts why this won't work? Thanks so much. .dropdownhoverIn a:hover { background-color: White; color: #39C; } <form id="form1" runat="server"> <div id="multiDropMenu"> ...

How do I get an item from a JavaScript object?

How do I get an item from a JavaScript object: var items = [ { ITEM:1, AMOUNT:10 }, { ITEM:2, AMOUNT:20 } ]; I want to be able to do something like this: $(items).filter(ITEM == 1).AMOUNT; ... which would return 10. ...

how to use clearTimeout to make the page work

Hi folks, back again. I just got some help with this snippet...so now I have one final step. This code adds a checkmark to a clicked item 5 seconds after it is clicked. Here's the problem: If three items are clicked in a row quickly, I need to cancel the timeout on the items that are not the last item clicked. The checkbox should only...

jQuery timeout issue

Hi all. I have already gotten some good help on a piece of code I'm struggling with. Hopefully someone can help me again. I have code which shows a checkmark next to an item 5 seconds after it's clicked. The problem: I need to cancel the checkmark popping up if the user is rapidly clicking links. Here's the demo: www.jontakiff.com/c...

MySQL dB of POI, drop down with varius radiuses, results ajaxed onto a google map??

I have a MySQL database of addresses (my custom points of interest - not Googles) and their associated Lat/Long. What would be the simplest way for a user to my site (their lat/long is also stored in their user profile) to be shown a: google map with their own lat/long as a starting (center) point default radius of 10 Miles all Points...

Why is ruby on rails returning null instead of json object

I'm new to Rails so this is really basic and I'm sure I'm missing something simple. I'm trying to send some JSON to an action and get it to return a response in JSON. A simplified version of what I'm trying is below. The jQuery I'm using: var request = { 'voter': { 'voter_name': 'John', 'voter_email': '[email protected]'} }; var url = '...

How do I get the string representation out of a jQuery object?

Really dumb question but, for instance, given: var $foo = $('<div>bar</div>'); How would I get the '<div>bar</div>' back out? ...

jQuery, Ajax and REDIRECT_QUERY_STRING

Hi, I've been attempting to refactor a fairly simple three or four page site to use a very lightweight MVC setup (probably overkill - but I thought I'd try it out for fun). The site uses an .htaccess file: RewriteEngine on RewriteCond %{REQUEST_FILENAME} -s [OR] RewriteCond %{REQUEST_FILENAME} -l [OR] RewriteCond %{REQUEST_FILENAME...

jquery animate opacity for images with links

Hi, I am trying to get the fade effect of my image slider plugin to work correctly with links. At the moment the slider fades correctly however the links are failing to change. The first image is supposed to link to Google.com & the second link is supposed to link to Hotmail.com however both of them are linking to Hotmail.com only (the ...