BootstrapAdmin/Bootstrap.Admin/Scripts/Content.js

22 lines
734 B
JavaScript
Raw Normal View History

2016-11-02 12:12:53 +08:00
$(function () {
function iframeResposive() {
try {
var fra = $('iframe').get(0);
fra.height = fra.contentDocument.body.offsetHeight;
}
catch (e) {
}
}
$(window).on('load', iframeResposive);
$(window).on('resize', iframeResposive);
$('.menu-submenu a').click(function (event) {
2016-11-06 12:28:53 +08:00
var act = $(this).attr("data-act");
if (act === "True") return true;
event.preventDefault();
$('.menu-submenu a, .menu-submenu p').removeClass('active');
$(this).addClass('active');
$(this).parents("ul").first().find('p').addClass('active');
$('iframe').attr('src', $(this).attr('href'));
});
});