horizontal pane splitter
$(document).ready(function(){ $('#splitter>div:first').resizable({ handles:'e', minWidth:'100', maxWidth:'400', resize: function(){ var remainingSpace=$(this).parent().width()-$(this).outerWidth(); var divTwo=$(this).next(); var divTwoWidth=remainingSpace-(divTwo.outerWidth()-divTwo.width()); divTwo.css('width',divTwoWidth+'px'); } }); }); <!doctype html> <html lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> <title>StarTrackr!</title> <link rel="stylesheet" href="../../css/base.css"…
layout switcher ปรับหน้าจอตามขนาดหน้าจอได้ ย่อขยายได้
$(document).ready(function(){ stylesheetToggle(); $(window).resize(stylesheetToggle); }); function stylesheetToggle() { if($('body').width()>900){ $('<link rel="stylesheet" href="wide.css" type="text/css" />') .appendTo('head'); }else{ $('link[href="wide.css"]').remove(); } } body #container { width: 850px; } body #container p { width: 650px;…
custom scrollbar
$(document).ready(function(){ $('#fine_print').jScrollPane({ verticalGutter:20 }); });