!function ($) { $.fn.h6Size = function () { $h6 = this; $h6.each(function(i) { var W = $(this).width()-$(this).find('.toggle-control').width()-$(this).children('b').outerWidth(true)-5; $(this).children('span').width(W); }); }; }(window.jQuery); $(function() { // $('.toggle-check').togglebox(); var $mapTree = $('.map-tree'), $mapTreeItem = $mapTree.children('li'), $mapItemH6 = $mapTree.find('h6'); var mapItem = function(w) { var WinW = $(window).width(), W = null; if(WinW < 767) { W = w; } else { W = (w-64)/2; }; return W; }; $('#map-tree-language').css('margin-left',ml = function() { var W = null; $(this).children('li').map(function(i, v) { W -= $(v).width()/2; }); return W; }); $mapTree.each(function(i) { $('.line').append("