jquery

with jquery, how would i get get all hidden input within an html table "mytable" that has class= "updatable"

question in subject . . basically i see that i can do this to get all hidden elements var input = $(#mytable:hidden); but i can't seem to do something like this: var input = $(#mytable:hidden:input.updatable); is there a way to have multiple criteria in a selector ...

Kill Event when hover off in Jquery

I've seen this somewhere before but I can't seem to find the little snippet. If I have a div that sets opacity (or animates up) on hover, but I hover off that div before its done animating, I want it to toggle back. Otherwise I hover over it a few times and I have 10+ seconds of animation/flashing to wait for. Here is my code: $("a.pr...

Jquery - selector, made of object and string, can it be done?

Hello, Assume that there is an object, passed as an argument to a function. the argument name is "obj". can it be concatenated as followed? $(obj + " .className")...... OR $(obj + "[name='obj_name'])...... Thanks. ...

Jquery: Loading GoogleMaps by Ajax gives blank screen

Hello, I am using Jquery to get googlemap data and load it into a div. My googlemap comes from the MVCMaps control which is located on a usercontrol. My code is as follows: $.get('<%= Url.Action("GetMapHtml", "Post") %>', function(data) { $('#MapWndCont').html(data); }); My controller method: public ActionResult GetMapHtml() {...

jQuery: Replace multiple regex matches with string?

I am trying to use this block of code to replace ALL "123"'s in a long string with a different number. var new_id = new Date().getTime(); $('#food').after( "<div id='123' name='123'> etc etc".replace('123', new_id) ); But it's only replacing the first 123 with the new_id. Is there a way to replace all of them? ...

Drag and drop ordering of formset with extra entries

I have been looking for a way to allow the user to easily change the order of entries in a formset. I found a StackOverflow question that addresses this subject, with the accepted answer referencing a Django Snippet that uses a JQuery tool to allow drag 'n drop of the entries. This is nifty and cool, but I have a problem with 'extra' e...

Should I use DOM-ready functions if my scripts are at the end of the body?

I know that, in jQuery, we are told to use $(document).ready() in order to ensure that the DOM elements are ready for interaction. I know that this definitely applies if the script tags are in the <head>. If they are at the end of the <body>, after all of the DOM elements, should I still use a DOM-ready function? Are there browsers in wh...

OnSubmit with Mobile Safari

While using jCart I noticed that it did not work on the iPhone. After some testing (and speaking with the developer on the jcart forum ) it seems that it fails to call the submit handler when clicking a submit button: $('form.jcart').submit(function(){...}); I have tried changing this to: $("form.jcart input[type='submit']").click(f...

Show Google maps based on the address in MVC/jquery

I need to show the google map based on the address of a contact in my asp.net (MVC) c# application. I have a list of contacts in my application. When the user views a particular contact, i need to show the google map of the contact's address, to the side of contact view page. How can i implement this functionality using jquery in MVC? ...

a div above another?

i have some php files with html code in it and from my php file i have: require "popup.html"; require "main.html"; then i use css to hide the div in popup.html. when i click a link coupled to jquery to display the popup it will be above all divs in main.html except the ones that i have rendered in with ajax. how can i make the pop...

jquery selector help

i have a event i trigger on every link in my site. but then i want it to NOT trigger on links i've got class='nofocus' on. for example <a>link</a> <a class='nofocus'>register</a> $('a').live('click', function() { $('#searchbox').focus(); } how do i rewrite the $('a) so the second link wont trigger the event? ...

KeyUp jQuery in Facebook iFrame app

I'm making a facebook game and the users asked me to make the game start by pressing spacebar, because clicking on a button wastes their time. I tried to make it by this code: jQuery("body").focus().bind('keyup', function (e) { if ( e.keyCode == 32 ){ startgame(); }}); But this code doesn't work in the app (http://apps.facebook.com...

Jquery flot and week numbers

I made a page to plot average snowdepth by week number. Now that we entered 2010, week 1 my graph stretches the interval on the x-axis (yearweek). What I want is the weeknumber on the x-axis (51,52,1,2 etc), and a fixed intervalwidth. Anyone know how to do that? example <script id="source" language="javascript" type="text/javascript"...

Append text into a div with Jquery

Hello, I've tried the following code in my sample page and it doesn't work.All I'm trying to do is just append some text into a div on the page when the button is clicked. <asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent"> <script type="text/jscript"> $(document).ready(function () { ...

jquery dynamically adding button element with 'type' attribute failed in IE7.

The code var comment = $('<div>') .addClass('comment') // problem in IE7 .attr('id', 'comment-'+item.id) .appendTo($('#comments-list'); The problem When program executes to .adddClass in IE7, got error message Object doesn't support this action I got this error from IE debugbar. Any fixes? [correctio...

How to let the div grows based on Jquery sortable grid's height?

Hi, I am new to Jquery, and trying to follow an example on JqueryUI Display Grid, and putting it on a div. So the code basically looks like this: JS code: $('#demoList').sortable(); $('#demoList').disableSelection(); var contentHeight = $('#demoContent').height() + 200; $('#demoContent').animate({height: contentHeight}); HTML code...

jQuery issue with live click and input named "name"

jQuery live click isn't working form me if form contains input named "name". Changing name to something else helps. Can anyone tell me why that happens? If there is a field name "named" live click is not working when I click input named "value". If I change name from "name" to "name2" clicking on field named "value" works. <script src=...

How to run an ajax call after another ajax call?

Here is the problem that I am having. The user can log in but if they don't refresh the page they can not log back out. So how do I call another ajax call right after another? The log out link is being loaded by the fist ajax call, could that be the problem? Here is the log in jquery code: $(".bt_login").click(function (){ $.aj...

tweetboard effect sliding frame

When you visit this link http://tweetboard.com/alpha/ you will see a Tweets label on the left. When you click this tweets label, another site loads inside this panel/iframe. Can you please help me understand how this feature is created? It seems that I should be able to create this effect using standard HTML and jQuery. If you can ...

can anyone determine why the Jquery ui tabs events are not firing in the below code

in the below code none of the alerts are getting called? <head> <script src='../../Scripts/jquery/jquery.js' type='text/javascript'></script> <link rel="stylesheet" href="../../content/jquery-tabs/jquery.tabs.css" type="text/css" media="print, projection, screen"> <script src="../../Scripts/jquery-tabs/jquery.history_remote.pack.js" typ...