jquery

jquery: replace inputs with spans

I'm trying to replace inputs with spans containing the input values in such a way as to be able to switch them back upon clicking a button. I figure this would be most easily done in two stages - adding <span>[input value]</span> in front of the inputs, and then hiding the inputs. The only problem is I'm having trouble with the first par...

Stop jQuery from calling next events

I write a jQuery plugin the first time and I'm wondering if there is a way to stop jQuery from running the next attached events. Example: $(this).submit(function(){ return $(this).do_some_validation(); } If validation didn't pass (i.e. the function returned false), the form should not be submitted, but if there are any other even...

jQuery Autocomplete or Ajax AutoCompleteExtender

What's benefit using jQuery Autocomplete over Ajax AutoCompleteExtender? Can some one explains the benefits one over another? ...

Creating a custom jQuery build?

We have a small javascript project that will be using a handful of jQuery selectors, but we don't by any means need the full jQuery package (i.e. effects). Is there any current way to get a custom build of the latest jQuery (1.4.2)? ...

Ajax alert when a row has been added to a mysql database

I am trying to create a live orders page for my website. I need the page to auto-update to show that a new order has been placed and to display an alert/sound whenever a new order row is in the database. Any ideas on how i can easily achieve this? Thanks, -AJay ...

jQuery show/hide column on big table performance

Hi, I have html table with about 30 columns and somewhere between 10 to 500 ish rows. I would like to show/hide a set of columns o a button click. I have tried 2 approaches iterate through table's thead th and do .show() or .hide() on the TH and TD. iterate through table's thead th and change class to show/hide the TH and TD. the...

Looking Overlay options using JQuery

Hi, I am new to JQuery and looking for some options to show an overlay with spinner (progress bar) on the page and my another requirement is to disable the page till my page loads with data and the spinner is active when my page is loading data and goes away once the data is ready. Can you give me some idea how to achieve this requiremen...

How to re-input an AJAX request on press back button in the browser?

I have a search that returns an AJAX(MVC AJAX Form) grid, and, in the grid there is a "details" button. When I press "back" I want to return the page with the returned results(that are loaded via AJAX after the page has open). How can I do that? Using ASP.NET MVC AJAX or Jquery? ...

using Blobstore Python API with ajax

there is any sample showing how to use the blobstore api with ajax? when i use forms works fine, but if i use jquery i don't know how to send the file and i get this error: blob_info = upload_files[0] IndexError: list index out of range I have this code in javascript function TestAjax() { var nombre="Some random name"; aja...

jQuery prepend() Bug?

Hello, I'm using prepend() and the result seems to be buggy. $('#element').prepend('<div><a href="http://google.com"&gt;&lt;a href="http://test.com"&gt;Test.com&lt;/a&gt; - A site</a></div>'); And the html result (also viewed with Firebug) is buggy: <div> <a href="http://google.com"&gt;&lt;/a&gt; <a href="http://test.com"&gt;...

Help with rails collection_select [edited]

I have been trying to implement this jquery plugin to my app.I need help trying to output something like this <select name="user[university_id]" id="user_university_id" class="selectable"> <option value="1" title="uni1">Uni1</option> <option value="2" title="uni2">Uni2</option> </select> by using a rails helper...the problem i...

Struggling with jQuery Toggle function

I am working on a band blurb page, example here. The idea is to click on a photo which will display the band member blurb on the left, overlaying the overall band description. My issue with the current code is that using toggle to display the alternative individual blurbs means that when you click between the different members, sometim...

iframe changing main page jquery or html

i have a iframe and it is linked to pictures.html and on this page i have links but when i click the links it changes the ifame page is there anyway i can change the main page using jquery or something? ...

jQuery rounded corners with border in IE

Hi, I have a problem with my website in IE8 (6 and 7 also I guess). My main div has rounded corners. I did that with jQuery.corners - this works fine in Firefox en also IE! The problem is: in IE I don't see the (white) borders... Does someone know why? Or is it nog supported? The site is: http://77.243.237.196/~ksaatom/newsite It wou...

How to check id of textbox in javascript?

Hello, I have this great javascript that automatically populates the values of all textboxes on a page with a number, starting at 1 then increasing. function editTextBoxes() { var textboxs = $('input:text'); for (i = 0; i <= textboxs.length; i++) { $('input:text:eq(' + i + ')').val(i + 1); } } ...

Cycle to next tab if current tab is empty - Jquery UI Tabs

I'm using tabs from jquery ui. When the page loads and if the first tab is empty, I would like the second tab to get selected. and if the second tab is empty, then the third tab gets selected etc. This is what I have and it works, but is there a cleaner/better way to do it? $('#tabs').tabs( { selected: 0 } ); var fullTab = 0; if ($(...

fadeIn() fadeOut() in jQuery not working in IE but does in FF

I have the following code that isn't working in IE, any thoughts? <script type="text/javascript" src="assets/js/jquery-1.3.2.min.js"></script> <script type="text/javascript"> $(document).ready(function(){ $('#login-ad').hide(); $('.Sub').click(function() { $('#login-ad').fadeOut(); $('#remove-for-login').fadeIn()...

Cufon / Jquery Parent Item only

I have a multi stepped navigation and I want to apply cufon to only the top level. So it goes like this: <ul> <li> <a href="#"> CUFON ME </a> <ul><li>sub nav, dont cufont me</li></ul> </li> </ul> Right now its selecting all the child elements, I just want the top level one to be selected. Cufon.set('font...

Replace part of an image url in ASP.NET using JQuery

Hi, I have a script which translates an image url to a path and works fine for an image fade on primary node navigation. The script below gives me: http://localhost/Bar/App_Themes/main/images/Beers-Faded.gif Once I navigate one node deeper it adds the application path to the url and the function fails: http://localhost/bar/Bar/App_T...

Changing height of a div - Firefox and IE?

Hey all - I have a fixed size div with another div inside that holds Flash at 100%. I need to change the height of the fixed div on the fly. This works in Safari, but not on FF or any Windows browsers <div id="center1200"> <div id="content"> </div> </div> and I call with jQuery $("#center1200").height(1000); ...