
Untitled
By: a guest on
Aug 11th, 2012 | syntax:
None | size: 1.63 KB | hits: 8 | expires: Never
test for condition m AND condition n using jquery
// remove the menuA-open class from all class menuA objects except the one being toggled
$(".menuA[name!=" + $(this).text() +"]").removeClass("menuA-open");
($(".menuA[name!=" + $(this).text() +"]") and $("menu[type]==$(this)[type])).removeClass("menuA-open");
$(".menuA[name!=" + $(this).text() +"]").removeClass("menuA-open");
$(document).ready(function() {
$(".menuA").click(function(evnt) {
evnt.preventDefault();
$(".menuA").not(this).removeClass("menuA-open");
// hide all other fieldset objects except the one being toggled
$('fieldset').not($(this).next('fieldset')).hide();
// toggle the fieldset following this link open or closed
$(this).next('fieldset').toggle();
// toggle the currently selected menuA-open class on or off
$(this).toggleClass("menuA-open");
});
$("fieldset").mouseup(function() {
return false;
});
$(document).mouseup(function(evnt) {
// if user clicked anywhere outside our menus
if ($(evnt.target).parent("a.menuA").length == 0) {
// remove the menuA-open class from all class menuA objects
$(".menuA").removeClass("menuA-open");
// hide all fieldset objects
$("fieldset").hide();
}
});
});
$(".menuA[name='abc'][type='123']").removeClass("menuA-open");
var type = $(this).attr('type');
$(".menuA").not(this).filter("[type='"type"']").removeClass("menuA-open");
$(".menuA").not(this).removeClass("menuA-open");
$(".menuA[name!='" + $(this).text() +"']").removeClass("menuA-open");