TalkPHP

TalkPHP (http://www.talkphp.com/forums.php)
-   Javascript, AJAX, E4X (http://www.talkphp.com/javascript-ajax-e4x/)
-   -   jQuery and firefox checkboxes?? (http://www.talkphp.com/javascript-ajax-e4x/3113-jquery-firefox-checkboxes.html)

drewbee 07-13-2008 05:48 AM

jQuery and firefox checkboxes??
 
Hey all,

First i would like to say that I have been playing with jQuery and I am throughout impressed. Lotsa fun stuff with it.

For those that have used it, I am having some trouble with firefox and its annoying ability to remember the 'state' of what was selected, checked, inputed, entered etc on the form prior to a page refresh.

I have some events that fire off based on a checkbox selection (opens a few divs). However, if the user hits refresh in firefox, it remembers it being checked, and thus on the next page load will have it checked, but alas no open divs.

I tried binding the function to the load and ready event handlers but no go on that one. I guess the question is, how do I execute my event handlers on page load as well? I am out of ideas on this one. I thought load would take care of it, but no cigar on that one.

Thoughts, ideas, or suggestions?

flyingbuddha 08-27-2008 05:54 PM

Code:

$(function(){
    $('input:checked').each(function(){
        // trigger the event for the relevant div, generic example:
        $('div').trigger('click');
    });
});



All times are GMT. The time now is 01:25 PM.

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0