[jQuery] weird problem with remove or toggle Class
I ve just downloaded new version of jquery 1.2.1 and i tried to do sth like
that
menu
<div class="submenu hidden">
<div>
zamknij
login.html?form_action=logout wyloguj
start.html start
<!-- trzeba zadbac aby przy relodowaniu nie ubic
sesji -->
</div>
<div>
kontrahent
zamowienie
produkt
dokumenty
wynik wyszukiwania
</div>
</div>
and my simple code in JQ is
$(function(){
$('#open_menu').click(function(){
var $r = $(this).next().filter('div');
$r.removeClass('hidden');
});
});
result is that i dont have any errors or warning in js console, the sub menu
is showing itself and suddenly after that page reloads itself due to
something i really don't know.
if I change code to something like that:
$(function(){
$('#open_menu').click(function(){
$(this).next().filter('div').removeClass('hidden');
});
});
then I have this:
FIREBUG WARNING: [Exception... "Component returned failure code: 0x8000ffff
(NS_ERROR_UNEXPECTED) [nsIScriptableUnicodeConverter.ConvertToUnicode]"
nsresult: "0x8000ffff (NS_ERROR_UNEXPECTED)" location: "JS frame ::
chrome://firebug/content/lib.js :: anonymous :: line 191" data: no]
Warning: Element referenced by ID/NAME in the global scope. Use W3C standard
document.getElementById() instead.
Source File:
Line: 1
Warning: Element referenced by ID/NAME in the global scope. Use W3C standard
document.getElementById() instead.
Source File: javascript: with (__scope__.vars) { with (__scope__.api) { with
(__scope__.userVars) { with (window) {try
{__scope__.callback(eval(__scope__.expr));} catch (exc)
{__scope__.callback(exc, true);}}}}}
Line: 1
come one, what is wrong with my code or with that lib....
--
View this message in context: http://www.nabble.com/weird-problem-with-remove-or-toggle-Class-tf4517184s15494.html#a12885125
Sent from the JQuery mailing list archive at Nabble.com.