首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > Web前端 >

图片预览编者

2013-07-16 
图片预览编辑来源:http://odyniec.net/projects/imgareaselect/Quick Usage InstructionsDownload the plu

图片预览编辑
来源:http://odyniec.net/projects/imgareaselect/

Quick Usage InstructionsDownload the plugin, unzip it, and copy the JavaScript and CSS files to your website/application directory. Load the files in the <head> section of your HTML document.<head>  ...  <link rel="stylesheet" type="text/css" href="css/imgareaselect-default.css" />  <script type="text/javascript" src="scripts/jquery.min.js"></script>  <script type="text/javascript" src="scripts/jquery.imgareaselect.pack.js"></script>  ...</head>Then, to enable selection on an image, wrap it in a jQuery object and call the imgAreaSelect() method:<script type="text/javascript">$(document).ready(function () {    $('img#photo').imgAreaSelect({        handles: true,        onSelectEnd: someFunction    });});</script>

热点排行