gigebyte / cookies

Automatically exported from code.google.com/p/cookies
0 stars 0 forks source link

checkbox cookiebind not always firing change event #22

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps reproduce the problem?
1. Create page with checkbox and bind it e.g. $('#mycheck').cookieBind();
2. open the page only check the box and then refresh. Then it is not
checked and more.
Attached is minimal sample and a modified script.

What is the expected result of the above steps?  What do you see instead?
  Cookie should be saved and rebound when loading/refreshing page

What version of the following are you using?
  jQuery: 1.4.1
  cookies: 2.2.0

What browser/version are you using?
IE 8

What OS/version are you using?
Windows

Do you have any additional information to provide?
Something I did to fix it was replace the cookiebind with this:
if ($this.is(':checkbox, :radio')) {
    $this.cookieFill().click(function() {
        $this.cookify(options);
    });
}
else {
    $this.cookieFill().change(function() {
        $this.cookify(options);
    });
}

Original issue reported on code.google.com by John.Her...@gmail.com on 22 Feb 2010 at 10:26

Attachments:

GoogleCodeExporter commented 9 years ago
Made a mistake I tested with jQuery 1.3.2 and 1.4.1 has added checkbox, radio 
and
select based change on click.

Original comment by John.Her...@gmail.com on 25 Feb 2010 at 7:27

GoogleCodeExporter commented 9 years ago
Hi John, thanks for following up.  Are you saying that using jQuery 1.4.x 
resolves the problem you're having?

Thanks a lot,
Jim

Original comment by auldrid...@gmail.com on 25 Feb 2010 at 4:05

GoogleCodeExporter commented 9 years ago
John...?  Please see last comment...

Original comment by auldrid...@gmail.com on 10 Nov 2010 at 2:21

GoogleCodeExporter commented 9 years ago
Oh sorry forgot to respond.

Yes in 1.4 the issue didn't occur anymore.

Original comment by John.Her...@gmail.com on 10 Nov 2010 at 6:35

GoogleCodeExporter commented 9 years ago
Ok, thanks for the update. As I have never seen this happen, and it seems 
corrected by jQ itself, I will close this out.

Thanks again,
Jim

Original comment by auldrid...@gmail.com on 10 Nov 2010 at 11:37