Commit 5f9d585e by fengshuonan

调整自定义js

parent e98b9345
......@@ -6,9 +6,9 @@ $(function () {
jQuery(document).on('click', '.mega-dropdown', function (e) {
e.stopPropagation()
});
// ==============================================================
// ==============================================================
// This is for the top header part and sidebar part
// ==============================================================
// ==============================================================
var set = function () {
var width = (window.innerWidth > 0) ? window.innerWidth : this.screen.width;
var topOffset = 70;
......@@ -34,9 +34,9 @@ $(function () {
};
$(window).ready(set);
$(window).on("resize", set);
// ==============================================================
// ==============================================================
// Theme options
// ==============================================================
// ==============================================================
$(".sidebartoggler").on('click', function () {
if ($("body").hasClass("mini-sidebar")) {
$("body").trigger("resize");
......@@ -55,7 +55,9 @@ $(function () {
});
// topbar stickey on scroll
$(".fix-header .topbar").stick_in_parent({});
$(".fix-header .topbar").stick_in_parent({
});
// this is for close icon when navigation open in mobile view
......@@ -67,18 +69,18 @@ $(function () {
$(".sidebartoggler").on('click', function () {
$(".sidebartoggler i").toggleClass("ti-menu");
});
// ==============================================================
// ==============================================================
// Right sidebar options
// ==============================================================
// ==============================================================
$(".right-side-toggle").click(function () {
$(".right-sidebar").slideDown(50);
$(".right-sidebar").toggleClass("shw-rside");
});
// ==============================================================
// ==============================================================
// Auto select left navbar
// ==============================================================
// ==============================================================
$(function () {
var url = window.location;
var element = $('ul#sidebarnav a').filter(function () {
......@@ -94,9 +96,9 @@ $(function () {
}
});
// ==============================================================
// ==============================================================
//tooltip
// ==============================================================
// ==============================================================
$(function () {
$('[data-toggle="tooltip"]').tooltip()
})
......@@ -112,9 +114,9 @@ $(function () {
$(function () {
$('#sidebarnav').metisMenu();
});
// ==============================================================
// ==============================================================
// Slimscrollbars
// ==============================================================
// ==============================================================
$('.scroll-sidebar').slimScroll({
position: 'left'
, size: "5px"
......@@ -155,20 +157,20 @@ $(function () {
, color: '#dcdcdc'
});
// ==============================================================
// ==============================================================
// Resize all elements
// ==============================================================
// ==============================================================
$("body").trigger("resize");
// ==============================================================
// ==============================================================
// To do list
// ==============================================================
// ==============================================================
$(".list-task li label").click(function () {
$(this).toggleClass("task-done");
});
// ==============================================================
// Login and Recover Password
// ==============================================================
// ==============================================================
// Login and Recover Password
// ==============================================================
$('#to-recover').on("click", function () {
$("#loginform").slideUp();
$("#recoverform").fadeIn();
......@@ -177,7 +179,7 @@ $(function () {
// ==============================================================
// Collapsable cards
// ==============================================================
$(document).on("click", ".card-actions a", function (e) {
$(document).on("click", ".card-actions a", function(e) {
if (e.preventDefault(), $(this).hasClass("btn-close")) $(this).parent().parent().parent().fadeOut();
});
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment