發表文章

目前顯示的是有「Jquery」標籤的文章

Get URL Parameters using jQuery

Get URL Parameters using jQuery To implement this, I have created a function which returns value of any  parameters  variable. function GetURLParameter(sParam) { var sPageURL = window.location.search.substring(1); var sURLVariables = sPageURL.split('&'); for (var i = 0; i < sURLVariables.length; i++) { var sParameterName = sURLVariables[i].split('='); if (sParameterName[0] == sParam) { return sParameterName[1]; } } }​ And this is how you can use this function assuming the URL is,  " http://dummy.com/?technology=jquery&blog=jquerybyexample ".  var tech = GetURLParameter('technology'); var blog = GetURLParameter('blog'); So in above code variable " tech " will have " jquery " as value and " blog " variable's will be " jquerybyexample ". Source from: http://www.jquerybyexample.net/2012/06/get-url-parameters-using-jquery...

The best jQuery plugin for creating side menus and the easiest way for doing your menu responsive

圖片
The best jQuery plugin for creating side menus and the easiest way for doing your menu responsive (Yes, I like the way Facebook implements its menu on mobile) By Alberto Varela Download You will be able to create multiple sidrs on both sides of your web to make responsives menus (or not, it works perfectly on desktop too). Fill the sidrs normally, with existent content, remote content,... or what you want. Source from : http://www.berriart.com/sidr/

File manager for Web

elFinder 2.0 (rc1) jQuery and jQuery UI jQuery 1.6.1 or higher is required. If you use custom jQuery UI build than make sure selectable , draggable , droppable , resizable , dialog and slider are included. <link rel= "stylesheet" type= "text/css" media= "screen" href= "http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.14/themes/smoothness/jquery-ui.css" /> <script type= "text/javascript" src= "http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js" ></script> <script type= "text/javascript" src= "http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.14/jquery-ui.min.js" ></script> elFinder Include elFinder CSS and JS files. <link rel= "stylesheet" type= "text/css" media= "screen" href= "css/elfinder.min.css" > <script type= "text/javascript" src= "js/elfinder.min.js" ...

HTML5 Placeholder jQuery Plugin for all browsers (Including IE)

HTML5 Placeholder jQuery Plugin $(function() { $('input, textarea').placeholder(); }); source from: http://www.jqueryscript.net/demo/HTML5-Placeholder-For-All-Browsers-With-jQuery-placeholder/

用 jQuery Preload 預先載入圖片

圖片
一個幫助你預先載入圖片的 jQuery 插件 說明 做網站時常常會需要預先載入圖片來帶給使用者更好的體驗, 像是滑鼠滑過去改變背景圖, slideshow 改變圖片等等. 預先載入圖片可以避免滑鼠滑過時背景圖消失了幾秒才出現, 或是使用 slideshow 等待下一張圖切換過久的問題. Demo 按   這裡   檢視這個 demo 原始碼裡也包含了這個 demo 頁面 下載 從   Github   下載原始碼 需求 jQuery 1.2.3+ 支援瀏覽器 Firefox   2.0+ Internet Explorer   6+ Safari   3+ Opera   10.6+ Chrome   8+ 安裝 首先, 確定你使用了一個有效的   DOCTYPE 引用 JS 檔案 1 2 < script type = "text/javascript" src = " http://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js " ></ script > < script type = "text/javascript" src = "path-to-file/jquery.preload.js" ></ script > 使用方法 範例程式碼: 1 2 3 4 5 $.preload( '/img/space.gif' ,    '/img/loading.gif' ,    '/img/header-bg.png' ,    '/img/avatar.jpg' ); Source from: http://dreamerslab.com/blog/tw/preload-images-with-jquery-preload-plugin/