resizeMap();
}
+
+ $(document).ready(function () {
+ $("#sidebar").on("opened", resizeMap);
+ $("#sidebar").on("closed", resizeMap);
+ });
</script>
$("#sidebar").css("display", "block");
- <%= onopen %>
+ $("#sidebar").trigger("opened");
onclose = options.onclose;
}
$(".sidebar_close").click(function (e) {
$("#sidebar").css("display", "none");
- <%= onclose %>
+ $("#sidebar").trigger("closed");
if (onclose) {
onclose();
<% end %>
<% end %>
-<%= render :partial => 'sidebar', :locals => { :onopen => "resizeMap();", :onclose => "resizeMap();" } %>
+<%= render :partial => 'sidebar' %>
<%= render :partial => 'search' %>
<%= render :partial => 'resize' %>
<% end -%>
<% end -%>
-<%= render :partial => 'sidebar', :locals => { :onopen => "resizeMap();", :onclose => "resizeMap();" } %>
+<%= render :partial => 'sidebar' %>
<%= render :partial => 'key' %>
<%= render :partial => 'search' %>