jquery

JQuery UI Dialog - Ajax Update on success $(this).dialog('close');

Having issues referencing $(this) from within a the nested ajax 'success' function... I know this is a scope issue, but can't seem to find a clean way to close the dialog on a successful update. Thanks for any help. $("#dialog_support_option_form").dialog({ width: 400, height: 180, bgiframe: true, autoOp...

Converting a jQuery plugin to work on any object, not just DOM objects

I am using the jQuery physics plugin for a pet project I am working on. The plugin enables the moving of DOM objects in realistic ways using velocity, gravity, wind etc. However I want to use the plugin to calculate where objects are to be placed inside a canvas element, not DOM object. How do I change the plugin script to work for AN...

Problem with ajax form on Codeigniter

Everytime I test the email is send correctly. (I have tested in PC: IE6, IE7, IE8, Safari, Firefox, Chrome. MAC: Safari, Firefox, Chrome.) Nome: Jon Doe Empresa: Star Cargo: Developer Email: [email protected] Telefone: 090909222988 Assunto: Subject here.. But I keep recieving emails like this from costumers: Nome: Empresa: Cargo: Em...

How to retrieve parent container ID after sorting using Jquery sortable??

Hello I have following markup and javascript to sort some items. Items can be sorted within a block or across other blocks. It works but I have a problem in retrieving correct block ID after an item is moved from one block to another. For example, if I move item 1 within "Block 1", I get "I am in Block= block_1" but if I move Item 1 t...

Jquery persistent css selector equivalent to '.live()'

So today I just came across the 'live()' function that binds any future and past elements to the whatever event you choose, such as 'onclick'. Right now I'm having to set up buttons like the following each time I load a new button via ajax ... $('a.btn.plus').button({icons:{primary:'ui-icon-plusthick'}}); $('a.btn.pencil').button({icon...

Prevent form field to be edited without disabling field

I am currently working on a page that has a date picker for one of the field. One of the requirements by my client is to prevent the user from editing the field manually. Only the date picker would be possible to be used. (jQuery DatePicker) I had in mind to disable the field and use an hidden field to store the data (disabled from ob...

Placeholder is not shown in jquery sortable, drag & drop

I can't show Place holder for the sortable items in a div. <script type="text/javascript"> $(function() { $("#userContent").sortable({ handle: '.close_button', connectWith: '#userContent', placeholder: 'placeholder', forcePlaceholderSize: true, tolerance: 'pointer', revert: true, });...

simple jquery fetch from mysql

I am trying to use jQuery with MYSQL and I wrote something like this : <html> <head> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"&gt;&lt;/script&gt; <script> function example_ajax_request() { $('#example-placeholder').html('<p>Loading results ... <img src="ajax-loader.gif" /></...

How to judge the animate function complete and show something?

The code like this: $(".hide").click(function(){ $(".online-contact").animate({width: 'toggle',height: '100%'}, "fast"); $(this).hide(); $(".show-class").show(); }) I want to show the div with the class of show-class when the the animate function complete,what can I do it? ...

Accessing Microsoft Ajax validation object before sending jQuery Ajax call to server.

Hi, I've created a View which I do both server-side and client-side validation on the page using DataAnnotation attributes which decorate each input on the form. The validation take place when user tab out from a form control or when user clicks on "Submit" button which is of type "submit". <% Html.ValidationSummary("P...

jQuery - slideToggle() and Toggle Text

I have a contact form that can be hidden using .slideToggle() but I want the tab used to Toggle the form to change text based on wether the form is in view or hidden. Here is the jQuery: $("#slider").click(function() { $("#form_wrap").animate({ opacity: 1.0 },200).slideToggle(); }); I want the text of #slider to read 'Hide' then 'S...

jQuery toggle pushing other elements around... bullies!!

Ok, so in the left_col of my page, i have a list UL LI that incorporates a jQuery toggle to open a small box, which is "LoginBox". <ul> <li class="members"><a href="/members/signon.asp?userType=member">Members</a></li> <li class="employers"><a href="/employers/signon.asp?userType=employer">Employers</a></li> <li class="provi...

jquery plugin history not working on IE8

I am using the the jquery history plugin from http://www.mikage.to/jquery/jquery_history.html. I am not able to get the plugin to work on IE8. In Firefox it works as expected. IE8 works on the sample at the site of the plugin-creator. My site contains 3 links. I click entry 1 through 3 first. When entry 3 is shown I hit the back button...

How does Facebook codes their Cropping tool?

I ask this because I am currently trying to work out my own technique, and there are huge strategic hangups for the entire site when your begin this. Of them are: Using jCrop and rMagick, it takes up a huge amount of processing ( to which I have backgrounded ). Because I have it backgrounded, I must by ajax develop a feature that auto-...

styling the data loaded from another page

Tabs plugin I use loads the data from another page. Data loaded is in xml format so I need to style that data loaded. How can I do it? ny suggestion highly appreciated. tabs plugin $("div.row-title").tabs("div.panes", {effect: 'ajax'}, function(i) { // get the pane to be opened var pane = this.getPanes().eq(i); ...

Changing multiple objects with a new class name using Jquery

I'd like to click on a trigger and show a specific image. There are multiple triggers which would show a specific image related to it within a set. There are 4 sets The challenge for me is toggling the other images to hide only in this 'set' when one of these triggers are clicked, as there can only be one image showing at a time in each ...

How to auto bind plugin initializations for content loaded through ajax

I'm using expandable plugin by Brandon Aaron to auto grow my textareas in the form and it is working ok. the problem is that I'm loading a lot of pages through ajax so I need to rebind the plugin method to the textareas loaded through ajax. is there a way to do this kind of method calls like $("textarea").expandable(); through li...

JQuery: How to AutoComplete "City, State" ?

Question: How can you use the JQuery Auto-Completion plugin to suggest a location ("City, State") for an input field? Meaning, someone wants to type in "Chicago, IL" ... so they begin typing "Chi" and it auto-suggestions "Chicago, IL". My biggest hurdles is finding a service that I can query to find out all US city+state names. I esse...

Toggling an "active" class between cousins.

So I currently have three unordered lists in my header. This is a single-page site that uses anchors to navigate. I need to have an "active" class to toggle between any anchor that is clicked between these three unordered lists. I still relatively new with jQuery and programming in general, but the basic structure of the page is outlined...

jQuery: filtering elements with multiple criteria

so here's the basic idea. I have a list of links, and an array of href values, I want to filter the links so that my list only contains the links that have an href value that exists in the array. I can do this like so: var filtered = unfiltered.filter(function() { for (var i = 0; i < ids.length; i++) if ($(this).is('a[href$...