Use jQuery chaining
This commit is contained in:
parent
05eba79008
commit
6255c96130
1 changed files with 4 additions and 10 deletions
|
@ -5,18 +5,12 @@ function openSidebar(options) {
|
|||
|
||||
if (options.title) { $("#sidebar_title").html(options.title); }
|
||||
|
||||
if (options.width) { $("#sidebar").width(options.width); }
|
||||
else { $("#sidebar").width("30%"); }
|
||||
|
||||
$("#sidebar").css("display", "block");
|
||||
|
||||
$("#sidebar").trigger("opened");
|
||||
};
|
||||
$("#sidebar").width(options.width || "30%");
|
||||
$("#sidebar").css("display", "block").trigger("opened");
|
||||
}
|
||||
|
||||
function closeSidebar() {
|
||||
$("#sidebar").css("display", "none");
|
||||
|
||||
$("#sidebar").trigger("closed");
|
||||
$("#sidebar").css("display", "none").trigger("closed");
|
||||
}
|
||||
|
||||
$(document).ready(function () {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue