is it some bug in firefox or jquery or i doing something wrong?
- by llamerr
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