分享好友 最新动态首页 最新动态分类 切换频道
GEM技术导航系统开心版源码.zip
2024-12-26 20:59
jQuery fontIconPicker ============== jQuery fontIconPicker is a small (`3.22KB` gzipped) jQuery plugin which allows you to include an elegant icon picker with categories, search and pagination inside your administration forms. The list of icons can be loaded manually using a `SELECT` field, an `Array` or `Object` of icons or directly from a Fontello `config.json` or IcoMoon `selection.json` file. Go to the [official plugin page](http://codeb.it/fonticonpicker) for examples and documentation. ![fontIconPickers](/demo/github-img.png) ## How it works Just include a copy of jQuery, the fontIconPickers script, the fontIconPickers theme and your Font Icons. Now you can trigger it on a `SELECT` or `INPUT[type="text"]` element. ### Include the JavaScript ```html <!-- jQuery --> <script type="text/javascript" src=https://download.csdn.net/download/m0_48462648/"jquery-1.7.1.min.js"></script> <!-- fontIconPicker JS --> <script type="text/javascript" src=https://download.csdn.net/download/m0_48462648/"jquery.fonticonpicker.min.js"></script> ``` ### Include the CSS ```html <!-- fontIconPicker core CSS --> <link rel="stylesheet" type="text/css" href=https://download.csdn.net/download/m0_48462648/"jquery.fonticonpicker.min.css" /> <!-- required default theme --> <link rel="stylesheet" type="text/css" href=https://download.csdn.net/download/m0_48462648/"themes/grey-theme/jquery.fonticonpicker.grey.min.css" /> <!-- optional themes --> <link rel="stylesheet" type="text/css" href=https://download.csdn.net/download/m0_48462648/"themes/dark-grey-theme/jquery.fonticonpicker.darkgrey.min.css" /> <link rel="stylesheet" type="text/css" href=https://download.csdn.net/download/m0_48462648/"themes/bootstrap-theme/jquery.fonticonpicker.bootstrap.min.css" /> <link rel="stylesheet" type="text/css" href=https://download.csdn.net/download/m0_48462648/"themes/inverted-theme/jquery.fonticonpicker.inverted.min.css" /> ``` ### Include Font Icons ```html <!-- Font --> <link rel="stylesheet" type="text/css" href=https://download.csdn.net/download/m0_48462648/"fontello-7275ca86/css/fontello.css" /> <link rel="stylesheet" type="text/css" href=https://download.csdn.net/download/m0_48462648/"icomoon/icomoon.css" /> ``` ### Initialize with jQuery Finally call the fontIconPicker on a `SELECT` or `INPUT[type="text"]` element. ```html <!-- SELECT element --> <select id="myselect" name="myselect" class="myselect"> <option value="">No icon</option> <option>icon-user</option> <option>icon-search</option> <option>icon-right-dir</option> <option>icon-star</option> <option>icon-cancel</option> <option>icon-help-circled</option> <option>icon-info-circled</option> <option>icon-eye</option> <option>icon-tag</option> <option>icon-bookmark</option> <option>icon-heart</option> <option>icon-thumbs-down-alt</option> <option>icon-upload-cloud</option> <option>icon-phone-squared</option> <option>icon-cog</option> <option>icon-wrench</option> <option>icon-volume-down</option> <option>icon-down-dir</option> <option>icon-up-dir</option> <option>icon-left-dir</option> <option>icon-thumbs-up-alt</option> </select> <!-- JavaScript --> <script type="text/javascript"> // Make sure to fire only when the DOM is ready jQuery(document).ready(function($) { $('#myselect').fontIconPicker(); // Load with default options }); </script> ``` ```html <!-- INPUT element --> <input type="text" name="mytext" id="mytext" /> <script type="text/javascript"> jQuery(document).ready(function($) { $('#mytext').fontIconPicker({ source: ['icon-heart', 'icon-search', 'icon-user', 'icon-tag', 'icon-help'], emptyIcon: false, hasSearch: false }); }); </script> ``` ## Plugin Options Here's fontIconPicker options: ```js var $picker = $('.picker').fontIconPicker({ theme : 'fip-grey', // The CSS theme to use with this fontIconPicker. You can set different themes on multiple elements on the same page source : false, // Icons source (array|false|object) emptyIcon : true, // Empty icon should be shown? emptyIconValue : '', // The value of the empty icon, change if you select has something else, say "none" iconsPerPage : 20, // Number of icons per page hasSearch : true, // Is search enabled? searchSource : false, // Give a manual search values. If using attributes then for proper search feature we also need to pass icon names under the same order of source useAttribute : false, // Whether to use attribute selector for printing icons attributeName : 'data-icon', // HTML Attribute name convertToHex : true, // Whether or not to convert to hexadecimal for attribute value. If true then please pass decimal integer value to the source (or as value="" attribute of the select field) allCategoryText : 'From all categories', // The text for the select all category option unCategorizedText : 'Uncategorized' // The text for the select uncategorized option }); ``` ## Plugin APIs fontIconPicker provides three public APIs to manipulating the icon picker. ### setIcons( `Array|Object` newIcons, `Array|Object` iconSearch ) Use this method to dynamically change icons on the fly. `newIcons` and `iconSearch` (optional) have same datatypes as `source` and `searchSource` options. ```js $picker.setIcons(['icon-one', 'icon-two']); $picker.setIcons(['icon-one', 'icon-two'], ['Icon one will be searched by this', 'Icon two will be searched by this']); ``` ### destroyPicker() Use this to remove the icon picker and restore the original element. ```js $picker.destroyPicker(); ``` ### refreshPicker( `Object|Boolean` newOptions ) Refresh the icon picker from DOM or passed options. Useful when DOM has been changed or reinitializing after calling the destroy method or changing the options values. ```js $picker.refreshPicker({ theme: 'fip-bootstrap', hasSearch: false }); ``` Options and APIs are discussed in details with live examples at the project page. ### Important notes for local demo Only when loading demo locally: In firefox fontIconPicker icons won't be shown correctly because of CORS. For the same reason "Load icons from Fontello JSON config file" won't work on Chrome or IE 10. If you need to do some local testing you can disable strict_origin_policy at your risk. ## Browser Compatibility jQuery iconPicker has been successfully tested on: Firefox (edge), Safari (edge), Chrome (edge), IE8+ and Opera (edge). ## Credits jQuery fontIconPicker has been made by [me](http://codeb.it) & [swashata](https://github.com/swashata). You can contact me at micc83@gmail.com or [twitter](https://twitter.com/Micc1983) for any issue or feauture request.
最新文章
百度权重是不是有做过调解_百度权重是不是有做过调解的事变(百度权重有什么作用)
第三,没做robots百度蜘蛛固然是呆板,但是也有喜好,当你的站点存在一些它并不喜好的内容时你还不做robots举行屏蔽,降权也就成了天然而然的事变 第四,站点内容过多重复,此重复有站点本身内容与内容之间的重复,也有站点本身内容和互联
百度蜘蛛池价格:站群与蜘蛛池,揭秘网络营销中的两种关键工具及其区别
百度蜘蛛池价格揭秘:本文深入探讨站群与蜘蛛池两种网络营销工具,阐述其价格差异及功能特点,帮助您了解这两种工具在网络营销中的关键作用。本文目录导读:站群蜘蛛池站群与蜘蛛池的区别网络营销中的应用在互联网营销的世界里,站群和蜘蛛
腾龙智能锁快速保修热线(人工客服)-滚筒洗衣机内筒松了怎么办,滚筒洗衣机内筒松动
第一步,检查锁紧螺母,如果螺母松动,可以使用扳手或者梅花扳手进行紧固。第二步,检查滚筒轴承,如果轴承磨损导致滚筒松动,需要更换轴承。第三步,检查皮带,如果皮带有松动或断裂的情况,需要更换皮带。第四步,检查滚筒后盖以避免造成
百度游戏风云榜抢先看,某波霸明星将出席
  看这个标题,估计要掉不少女粉了,其实你应该庆幸,你遇到的他还对女人感兴趣,他还是个男人,好吧,我总是担心太多。  嘿嘿,百度大数据大家都知道吧?就是过年期间从央视风靡到大街小巷包括北京小胡同的春运迁徙啦,当然,春运迁徙
解读搜索引擎工作原理 网站优化是必要的
说白了就是我们优化网站,针对的是搜索引擎。只有掌握搜索引擎的工作原理,才能知道如何提高网站的排名。优化网站的目的是获得一个好的排名。搜索引擎一般分为以下几个模块:爬行、过滤、记录、索引和排序。一:抢搜索引擎是通过连接爬行的
《上古卷轴5:重制版》黑暗兄弟会任务攻略
前往某地找到刺杀目标,一般可趁夜晚街上行人稀少,或是当目标睡觉的时候动手。刺杀完成,此次任务即告结束。此任务还会触发,再去找夜母接任务,周而复始。黑暗兄弟会任务-一些刺杀契约所有刺杀契约在你进行兄弟会主线任务“打破静寂”后
郑州事业单位招聘成绩的长尾关键词有什么
【郑州事业单位招聘成绩】长尾关键词有很多,郑州信息发布网为您整理各个搜索引擎的相关长尾关键词:百度的相关长尾关键词:郑州事业单位招聘成绩查询,郑州事业单位招聘成绩公布,郑州事业单位招聘成绩查询时间,郑州事业单位招聘成绩公示,郑
知名SEOer鼻祖夫唯宣布退出百度SEO
其实我们不一定要过多关注百度SEO,因为以主机邦这些年做网站的经验来看,百度虽然目前流量依然很客观,但是流量大不前了,并不是百度不给大家流量,而是百度自己自身都难保了,PC端百度的流量已经被必应赶超了,而移动虽然依然排国内第一
哪些品牌的高性能车最受欢迎?
要说高性能车,宝马 X6 M 得算一个,它把奢华和速度完美融合,加速、舒适性、操控都出色,价格在 146.89 - 219.00 万。汉也是很受欢迎,中大型轿车,价格 18.98 - 33.18 万,动力响应灵敏,空间宽敞。英菲尼迪 Q50L 是中型车推背感专家,价
推广链接怎么做?生成制作方法详解?
在当今的互联网时代,推广链接已成为网络营销和产品推广的重要工具。一个好的推广链接不仅能提高点击率,还能帮助企业或个人快速获取目标用户。那么,推广链接怎么做?本文将为您详细解析生成制作方法。一、了解推广链接的基本概念推广链接
相关文章
推荐文章
发表评论
0评