jquery

Call jquery datepicker from link and send the date through a post call

Hi all, I need to make the datepicker show when I click on a link and then send the selected date to a different page through a post call. T tried to use this code for the link call: $(".click-on-link").click(function(){ $('#datepicker').datepicker({ changeMonth: true, changeYear: true, dateFormat: 'dd/mm/y...

uncheck all checkboxes except the one with a class?

hi i try to check/uncheck all checkboxes that don't got a class to them. This is the code I got but it check the class boxes to. $(document).ready(function() { $('#ctl00_ContentPlaceHolder1_repReceivers_ctl00_chxAll').click( function() { if (!$("input[type='checkbox']").hasClass("testclass")) { $("i...

jquery trouble with getJSON call.

Hi guys. Got some basic problem again. I need to modify a function that previously returned a in code written object. Im now trying to get the object from json through $.getJSON function getEventData() { var result = ''; $.getJSON("ajax.php?cmd=getbydate&fromdate=&todate=", function(data){ result = data; ...

Replace all divs with value

I have the following code: $('#select_albums').load(document.location.href + "&action=get_albums"); But this is only replacing only the first found div with the id #select_albums from DOM. How do I replace all divs with an id? ...

fancybox popup appears behind google maps

hello i downloaded fancybox.net and edditted the example file from the download pack. i added a google maps map. and when i click on the iframe link, the iframe popup apears BEHIND the google maps map. thats not the way i want it offcourse. what did i do wrong? i didn't change the original code from the example file. see this image for...

jQuery ui checkboxes drive me crazy

Hello, I'm using a form with checkboxes from jQuery UI and I'm having some problems with them : here is my code : php <input type="checkbox" id="check'. $empl->getAttr('id') .'" class="intervenants" /><label for="check'. $empl->getAttr('id') .'">'.$empl->getAttr('nom').'</label>'; javascript $('.intervenants').each(function() { ...

jQuery accordion: is there a way to make the scrollbar fit the displayed panel?

I have a jQuery accordion (jQuery 1.3.2, jQuery UI 1.7.2), with between 3-12 content panels. Some of the content panels are large, and have lots of content. some are small, and have only a little. When I expand any of them, the scrollbar on the div containing the accordion (it's got css overflow: auto;) is set as if the largest of the...

changing iframe source with jquery

I've been trying this for a bit now and have looked at other answers to similar questions on SO, but when I am trying to change the src attribute of an iframe, it updates it for the whole window. Here is the following code I am using that works correctly (no jquery): <html> <head> <style type="text/css"> iframe#ifrm { border:none; ...

Ajax for binary data with jQuery?

I have a response which may return text/html or application/octet-stream. If I receive html, I'd like to replace part of the page with the returned response data, and if I receive binary data (a file download), I would like to display a message and send the data to the browser so that the user can download the file. Is there any way to d...

Idiomatic jQuery and selector paths in functions

What is the best way to write this function ontop of jQuery. Background: I'm working on a legacy web app that has lots of issues. It requires us to insert a IFrame to take care of a few "screens". Later this code will be refactored out but for now we need this. function openIframePage(selectorPath, url) { if ($(selectorPath).leng...

add event to top of event stack using jquery

I'm using jquery to add a blur event to a text box. I would like my event to fire before any other existing events. Is this possible to do? ...

Clone elements and load previously loaded scripts

Hi, I am using clone() to move certain elements into another place in the DOM, but had trouble due to the fact that the scripts previously rendered was not available anymore when called from the cloned elements. So I think I need to call them again, but one by one will be a PITA. Perhaps getScript will do, but I have no idea to call mo...

how to loop throw all the Fileds in the view to check wheather checkbox is checked or not using jquery

Hello friends. I have this code I am checking wheather checkbox i checked or not.. $('#btnsubmit').click(function() { $('#Details input[type=checkbox]').each(function() { if ($(this).attr('checked')) { alert("selected"); return false; } else { alert("...

How to pass a parameter to jQuery UI dialog event handler?

I am currently trying to hook up jQuery UI dialog so that I may use it to create new items to my page and to modify ones existing already on the page. I managed in the former. I'm currently struggling in the latter problem, however. I just cannot find a nice way to pass the item to modify to the dialog. Here's some code to illustrate th...

Why does animate not work for the first few 'selections' of my next button?

I'll just start right off the bat and say I'm fairly new to JQuery, so if you see some glaring issues with my code....let me know what I'm doing wrong! Either way, I've been working on a script to fade divs in and out using the z-index and animate. It "works" after about 2-3 clicks, but the first two clicks do not fade or animate as I ...

jquery anonymous function declaration meanings

Are the following assumptions accurate? 1) execute immediately (function(){ })(); 2) execute on document ready $(document).ready(function(){ }); 3) shorthand for on document ready $(function(){ }); 4) alternative shorthand for on document ready for avoiding cross script conflicts (function($) { })(jQuery); ...

Why can't I put a jquery-ui progressbar inside a div with fixed position?

I started the source from this progressbar example, and it works fine. My only change was to set the width of the progressbar to "20%". <!DOCTYPE html> <html> <head> <link href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/base/jquery-ui.css" rel="stylesheet" type="text/css"/> <script src="http://ajax.googleapis.com/ajax...

jQuery async ajax query and returning value problem (scope, closure)

Hi. Code not working because of async query and variable scope problem. I can't understand how to solve this. Change to $.ajax method with async:false - not an option. I know about closures, but how I can implement it here - don't know. I've seen all topics here about closures in js and jQuery async problems - but still nothing. Help, pl...

jquery errorPlacement

I have the following: $("#pmtForm").validate({ rules: { acct_name: "required", acct_type: "required", acct_routing: { required: true, digits: true, ...

Jquery- Get the value of first td in table

Hello. I am trying to get the value of first td in each tr when a users clicks "click". The result below will output aa ,ee or ii. I was thinking about using clesest('tr')..but it always output "Object object". Not sure what to do on this one. Thanks. My html is <table> <tr> <td>aa</td> <td>bb</td> <td>cc</td> <td>dd</td>...