is it some bug in firefox or jquery or i doing something wrong?
Posted
by llamerr
on Stack Overflow
See other posts from Stack Overflow
or by llamerr
Published on 2010-04-17T19:01:13Z
Indexed on
2010/04/17
19:03 UTC
Read the original article
Hit count: 195
I want to change hidden input value on div click, so i do following:
$('#gallery').click(function(){ if ($('input[name=isgallery]').attr('value') == '0') { $('input[name=isgallery]').attr('value', '1') } else { $('input[name=isgallery]').attr('value', '0') } $('#filterform').attr('action',$('#filterform').attr('act')); alert('ok'); $('#filterform').submit(); } );
when it equals 0 i change it to 1 and otherwise but it did not work and following code works:
$('#gallery').click(function(){ if ($('input[name=isgallery]').attr('value') == '0') { $('input[name=isgallery]').attr('value', '0') } else { $('input[name=isgallery]').attr('value', '1') } $('#filterform').attr('action',$('#filterform').attr('act')); alert('ok'); $('#filterform').submit(); } );
and also, when i delete the function at all it still works and form submits
maybe i have one more handler for this div, but i can't find one
you can check it on http://www.4block.org/en/museum/posters and click "gallery view" on top-right
© Stack Overflow or respective owner