jquery

using Jquery to find out what check boxes are checked

I have a table that i am enumerating through my model with. I have this check box there for each row. <input type="checkbox" name="IsSelected" value="<%=item.PartNo%>" /> I would like to use jquery to find out which of the check boxes are checked I tried doing this var selected = $("#IsSelected").val(); but selected is just un...

Parsing input to see whether it's an address, zip code, city or state?

I have a job board where a user submits his location, via Google-Maps API, which plots the job on a map. The problem is, because it is a location based job board, I want to make the most broad input allowable a ZIP code (so users can either enter a ZIP code or address). Is there anyway to either parse the input to determine whether it'...

Event Delegation in jQuery 1.4

I've got the following code: $("ul.relatedAlbums li").hover(function(){ $(this).css({fontWeight:"bold"}); }, function(){ $(this).css({fontWeight:"normal"}); }); I've heard good things about event delegation and speed performance. Using jQuery's delegate method, I imagine it would go something like: $("ul.relatedAlbums").deleg...

How to make a jquery object un-draggable?

Hi, Looking at the jquery demo at http://jqueryui.com/demos/droppable/#photo-manager, I'm trying to make the images in the Trash undraggable and am unable to do so. I've changed the demo so that the Gallery is no longer droppable, but the items in the Trash still follow my cursor if I mousedown. Of course, they have nowhere to go, so ...

How do I pass an element ID into my jQuery function.

I'm using Ben Nadel's iFrame Upload function for an editing tool on a site I'm working on. I'm learning jQuery. The function works beautifully. It's part of a reuseable modal window and everything works. But, I want to dynamically tell the function where the call came from so it loads the proper form into the modal window. How would I pa...

ie is not understanding 'false' from a JSON string?

I have some php that checks if a user is logged in and returns false, this is then passed via ajax to the browser to let the user know he needs to log in. Works perfect in FF and the alert returns 'true' but in IE, it returns 'null' no matter what I do // Check for logged in user $.getJSON(baseUrl+"index.php/login/checkState", func...

Append and bind click not working on IE (jQuery)

Im using this short code for adding some more fields to an online shopping cart, they work great in FF but get broken on IE, any help would be aprecciated $(document).ready(function () { $('#agregar').bind('click', function (){ $('#tabla').append("<tr><td><input type='text' name='codigo[]' class='box' /></td> <td><input type='text' ...

[jQuery] How to wait a fadeout effect and then remove the element?

I have a tr which will be removed when clicked in delete button, but before doing .remove() or empty() I'd like to wait for some fadeOut() effect. $(this).closest('tr').fadeOut(); setTimeout("$(this).closest('tr').remove()",1000); is not working, it only fades out. ...

Does jQuery's fadeIn() and fadeOut() not work with IE 8?

I have a page that fadeIn and fadeOut an inline element and jQuery doesn't work. And then when I change the Developer Tools to use Browser Mode of IE 7, then the fadeIn() and fadeOut() effect is showing. ...

Loading elements into the DOM with jQuery.

Hello everybody, I have a quick question that I'm sure some of you would have an answer for, let me explain. I'm working on a very simple website, static content, pure HTML, and CSS, and some javascript to make everybody's life easier. The site has a header, nav, side bar and footer and although the site is static, I thought I could use ...

On IE 7, jQuery's fadeIn() and fadeOut() requires the user to move the mouse around the area to see the update, why?

I have some jQuery's fadeIn() and fadeOut() and it works well in IE 7 and IE 8 (with the IE 7 Compatibility Mode) -- It works perfectly on Firefox, Chrome, and Safari as well. However, some part of it will not show any update of elements fading out and new elements fading in, until I move the mouse around that area -- then the whole reg...

jQuery,trying to validate one field or the other based upon what is chosen

Im trying to set up a form where a user has to pick an option from a select or enter a value in an input. One must be required but not both. I was attempting to write an if else statement if the state is selected then remove the class on province, if province is filled then remove class on state $("#state").bind('change' , function() {...

fullcalendar. If I hide month view and navigate to previous month, how could I rerender events to their perfect place

Hi, I have another self-defined agenda view. If the user clicks on button agenda, then, original view will be hidden. When the user navigate month, I have ajax call to get event data. On normal view, events are showing perfect. After I hide the normal view and use my agenda view, when the user wants to go back to normal month view, all e...

JQuery addon SimpleModal keeps reopening dynamically loaded iframe

Hi! I've found a similar question, but the accepted answer is not what I want: http://stackoverflow.com/questions/2382157/using-an-iframe-in-jquery-simplemodal-the-iframe-reload-when-the-popup-is-closed I want to first load content into an iframe dynamically, then when it has finished loading, use SimpleModal to display it. My problem ...

easy slider overflow problem on first load (again same problem)

I am having a strange problem, i am using easy slider 1.5 for slides. Everything works fine but when i load the page for the first time, right side overflows, then after refreshing the page once, everything goes to fine......... here is the link for the main page link text Okay here is my CSS part of the code, i think that i dont know ...

flexigrid -- fancybox

im using flexigrid.. having two button like add , delete on toolbar. want to create a input form as fancybox when click the add button how to create it? plz help me.. my code is below.. <script type="text/javascript"> $(document).ready(function(){ $("#flex1").flexigrid({ url: 'post2.php', dataType: 'json', ...

Click event handler inadvertently bubbles, even after calling jQuery's stopPropagation()

Hi, I'm trying to have different delegate click handlers for different elements within "li" elements in a list. Example: <ul id='myList'> <li> <p>First item.</p> <button>button1</button> <button>button2</button> </li> <li> <p>Second item.</p> <button>button1</button> <button>button2</button> </li> </ul> ...

How to refer to currently selected element in jQuery?

I'm trying to make a script that would insert img element after each link to a certain site with source equal to value of href attribute of given link. This is what I came up with: $("a[href*=site.com/img/]").after("<img src="+$(this).attr("href")+">"); Problem is, $(this) doesn't work (attr() returns undefined). Why is it? How to ref...

How to disable the Image using class name.. using jquery

$(".ui-datepicker-trigger").attr('disabled',true); I am trying to disable the Image button something like this.. but its not working but if I do its working $(".ui-datepicker-trigger").hide(); hide is wokring but disabled is not working? can any body tell me? thanks ...

Automatic newline in textarea

Using jQuery, how can I make a textarea that automatically adds a new line when inserting text when the cursor is near the end. The width of the textarea is dynamically done via CSS (e.g., #myTextArea { width: 80%; }) so I can't do anything like counting the characters in each line. I don't need a non-JS solution since the content of t...