Update web2py_bootstrap.js
This allows dropdown menu items to be open in the target specified if it exists without changing main/top window
This commit is contained in:
1 parent
285013a64a
commit
46b8ad3fdd
1 file changed
+10
-1
@@ -29,5 +29,14 @@ jQuery(function(){
|
|||||||
}
|
}
|
||||||
hoverMenu(); // first page load
|
hoverMenu(); // first page load
|
||||||
jQuery(window).resize(hoverMenu); // on resize event
|
jQuery(window).resize(hoverMenu); // on resize event
|
||||||
jQuery('ul.nav li.dropdown a').click(function(){window.location=jQuery(this).attr('href');});
|
jQuery('ul.nav li.dropdown a').click(function(){
|
||||||
|
if(jQuery(this).attr("target")){
|
||||||
|
window.open(
|
||||||
|
jQuery(this).attr('href'),
|
||||||
|
jQuery(this).attr('target') // <- This is what makes it open in a new window.
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
window.location=jQuery(this).attr('href');
|
||||||
|
}
|
||||||
|
});
|
||||||
});
|
});
|
||||||
Reference in new issue
Block a user