分享好友 最新动态首页 最新动态分类 切换频道
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.
最新文章
看过来!世界著名抗体公司汇总全在这里_老铁SEO
Santa是世界上最大的抗体生产厂家,目前可提供的抗体种类多达两万多种,几乎覆盖了目前生命科学研究的各个最新领域,其每种抗体又有多个克隆可以选择,还提供一些对应蛋白标准品及相关产品,如ABC试剂盒,各种标记二抗,Western试剂盒,蛋
除百度谷歌以外,还有哪些靠谱的网站统计平台?盘点五个好用网站统计平台工具对比推荐,你的网站统计用哪个?
网站运营需安装统计工具分析访问量、用户体验及搜索数据。百度统计适合中文网站,Google统计适用于非中文网站但可能影响速度。易分析、51LA和友盟也是优秀的统计工具,但可能需付费。选择最适合自己需求的工具是关键。 1、百度
情侣飞行棋小程序搭建流程,一起来看看吧
本文将详细介绍情侣飞行棋小程序搭建流程,以及其中的一些重要细节和知识。如果你是一位开发者或者对小程序开发感兴趣的用户,相信这篇文章会给你带来帮助。我们需要明确小程序是一种运行在微信客户端的应用程序,它可以为用户提供丰富的功
品牌网站设计与打造方案全攻略
摘要:本设计方案旨在打造品牌网站,以提升品牌形象和知名度,吸引更多潜在客户。设计将注重用户体验和视觉效果的融合,以简洁明了的界面展示品牌特色。方案将考虑网站的响应速度和兼容性,确保用户在不同设备上都能顺畅浏览。通过精心策划
更持久才更好用,年货节手机怎么选?7款长续航手机选购推荐。
很显然,在能耗表现上,骁龙8gen3就是当前最强的处理器,明显好于自家上一代的8gen2,联发科的天玑9300因为现在长续航的手机选择不多,所以暂时还看不出端倪。一加12年货节期间最高免息分期24期,并且有加赠Enco Air 2i 活动。同样的229g,
【阿里翁●神马商城】~FDA新品~Stabilize heart 安心片
高血压的主要症状头晕、头痛 头晕是高血压最多见的症状,有些是一次性的,在突然站起来或蹲下时出现;有些是持续性的。头痛也是高血压的常见症状,多为搏动性的胀痛或持续性的钝痛,严重者甚至有炸裂性的剧痛。常在早晨睡醒时发生,起床下
零售数据分析之操作篇11:销售占比分析
各位数据的朋友,大家好,我是老周道数据,和你一起,用常人思维+数据分析,通过数据讲故事。上期内容和作业上一讲讲了排名与TOP的场景,排名是以排序为基础,从1开始标识其排名的序号;而TOP则是以排序为基础,仅显示N行或N%行记录。上一
试试长亭科技吧,阿里云子公司
❶让你和+2老板汇报nbsp;如果是好事,就是给你露脸的机会,展示他带出来的人能力还不错;如果是坏事,就是让你主动去背锅,展示他不知情且还有管理空间nbsp;知彼解己,抓住每次和+2或大老板们汇报的机会,提前做充分准备nbsp;❷让你去做统
独立站卖家如何布局Google SEO?
做,大部分商家会选择见效快的付费,随着平台CPM节节攀升,群里好多人反馈广告花费更高了,广告效果却变差了。跑广告受伤的人怎么办?我们怎么能放过免费流量呢,FunnPin独立站学院特特别课堂开始了:独立站卖家应该如何布局Google SEO?什
高级设计师如何做搜索功能?来看这篇超全面的总结!
宜信大数据创新中心-UI 设计师李婷婷 :文章带大家一起了解如何通过设计提升搜索功能的视觉层次、情感体验、搜索效率等。一、搜索功能的作用搜索是我们经常使用的功能,当我们面对复杂的信息时,想找到目标信息,就会寻找搜索功能的位置,
相关文章
推荐文章
发表评论
0评