jquery

Why do I get a jQuery syntax error with .post and hide("slide")?

After I do the .post thing, I want to hide the first div with a left slide, then show the second with a right slide. My right-slide was working fine and then I went and tried to put in the left slide and I broke it all. if(hasError == false) { $.post("/process-email-signups",{email_address: email_addressVal}, function(data){ ...

jQuery animate layering issue in IE

If you hover over the <img> the 'hiddenPanel' <div> is to appear. This works fine in FF and other browsers, but in IE the <div> appears BEHIND the 'content' <div>. I've tried z-indexing to no avail. Anyone else having this problem? (Also, I will not move the code AFTER the 'content' <div> for layout reasons) EDIT: More code; jQuery / H...

Best Practice in Integrating JavaScript Actions w/ DOM

Let's assume, for instance, an xHTML document as below: <html> <head> </head> <body> <div id="wrapper"> <div id="sidebar"></div> <div id="content"></div> </div> </body> <script type="text/javascript" src="http://code.jquery.com/jquery-latest.min.js"&gt;&lt;/script&gt; <script type="text/javascript" src="./application.js"></script> <...

Is there a native jQuery function to switch elements?

Can I easily swap two elements with jQuery? I'm looking to do it with one line if possible I have a select element and I have two buttons to move up or down the options, and I already have the selected and the destination selectors in place, I do it with an if, but I was wondering if there is an easier way ...

Ajax call in a jQuery plugin not working properly

I'm trying to create a jQuery plugin, inside I need to do an AJAX call to load an xml. jQuery.fn.imagetags = function(options) { s = jQuery.extend({ height:null, width:null, url:false, callback:null, title:null, }, options); return this.each(function(){ obj = $(this); //Initialising the placehol...

JavaScript idiom: create a function only to invoke it.

I am learning YUI and have occasionally seen this idiom: <script> (function x(){ do abcxyz})(); </script> Why do they create a function just to invoke it? Why not just write: <script> do abcxyz </script> For example see here. ...

jQuery Datepicker closes on click, IE6

I'm using jQuery 1.3.2, with jQuery UI 1.7.1. I'm using a DatePicker attached to a text input field. It opens and renders fine in all browsers, and works perfectly in IE7, Firefox, Chrome, and Safari. However, in IE6, when I click anywhere on it, it closes without performing any action. Also, none of the hover effects work (e.g. when hov...

Multidimensional Arrays and jQuery's getJSON

I am submitted a getJSON request to a controller in my application, this controller is returning valid JSON with 2 "applications." I know this for a fact as if I move the alert statement to within jQuery's each function it will give me the expected result. I am attempting to store this data within a multidimensional array to later be us...

Is there a jQuery selector/method to find a specific parent element n levels up?

Consider the following HTML. If I have a JSON reference to the <button> element, how can I get a reference to the outer <tr> element in both cases <table id="my-table"> <tr> <td> <button>Foo</button> </td> <td> <div> <button>Bar</button> </div> </td> </tr> </table> <script type="text/js"> $('#table button').clic...

Submitting a form on 'Enter' with jQuery?

I have a bog-standard login form - an email text field, a password field and a submit button on an AIR project that's using HTML/jQuery. When I hit Enter on the form, the entire form's contents vanish, but the form isn't submitted. Does anyone know if this is a Webkit issue (Adobe AIR uses Webkit for HTML), or if I've bunged things up?...

What is this kind of javascript? And Help with AJAX request.

I recently asked this question: http://stackoverflow.com/questions/694849/dynamically-query-a-database-to-check-for-value/694860#694860 And I got an awesome and informative answer. But whenever I search on Google to find out more about "Ajax Requests" the codes never look similar to the one provided. Also I have used another tutorial t...

Jquery X,Y position send over ajax.

I need an example that uses jquery to send the current x,y position of a <div> (the top left pixel) to a php file using ajax where the position can then be processed. ...

Can't post twice from the same AJAX TinyMCE textarea

I've a list of elements editable via a simple AJAX/jQuery edit button, which works great. But when I try editing the same field a second time it doesn't want to play ball. EDIT - AJAX returns a tinyMCE textarea containing content from MySQL SAVE - AJAX posts tinyMCE contents to MySQL and displays posted content EDIT (again) - Returns t...

Bind GridView via jQuery ajax

I am new to jQuery, trying to populate a GridView or Telerik RadGrid using jQuery. Not sure how to go about it and unable to find any examples. Any help is appreciated. Thanks. Essentially I am trying to display a modal window with a textbox and button. The user enters a search criteria presses the button and a gridview in the same moda...

Photo Gallery Editor (some product planning questions)

I need to create an interface for building photo galleries. I've got a good idea of how I want the UI to work, and I'm looking for input regarding existing scripts I could use, jquery plugins, general advice, etc.. The UI will consist of a narrow column on the left that will contain small thumbnails of all the users images. The rest of ...

Company doesn't want to use ASP.NET ajax...what can I do?

Developers and management tell me that they want to move away from using asp.net ajax because it is big and cumbersome. I kind of agree, but I don't want to do all the javascript heavy lifting myself. Eventually I also want to introduce jQuery. I'm guessing right now it will also be a problem. Is there a good post somewhere outlining...

handle ajax error when a user clicks refresh

i apologise if this is something i should be able to look up. all of the terms i wanted were way overloaded.. here is my problem: when i open a page, it fires off a whole series of ajax calls. if i then press Shift+Refresh, all of those ajax calls are being considered errors, and showing their error message dialogs before the entire pag...

Jquery constantly ping for ajax responce.

How can I use jquery to constantly run a php script and get the response every second and also to send small bits of data on mouse down to the same script? Do I really have to add some random extension just to get such a simple timer to work? ...

Display message after form validation & before result page

I have a form that uses the excellent jQuery validation plugin. This is a multi-stage form, one of which involves uploading files, which are scanned for viruses before being accepted. As the upload & virus scan can take a while, I would ideally like to show the user an interim message, preferably in a modal-overlay style, which stays ar...

Jquery Dynamic Form - Quick Question

I have a form and up the top it contains four different radio buttons - the rest of the form changes depending on which of these radio buttons are selected. Currently each 'part' of the form is in its own fieldset and I'm hiding/showing these with Jquery. How can I only submit the data that is relevant to which part of the form is fille...