分享好友 最新动态首页 最新动态分类 切换频道
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.
最新文章
掌握Git分布式版本控制:从入门到实战
Git概述Git代码托管服务Git常用命令在IDEA中使用Git1.1 什么是Git Git是一个分布式版本控制工具,主要用于管理开发过程中的源代码文件(Java类、xml文件、html页面等),在软件开发过程中被广泛使用。 在IDEA开发
羊小咩在“双11”中展现智能化魅力,助力消费者享受美好生活
随着今年“双11”电商购物节的火热开启,各平台销售数据再创新高,消费热情持续升温。从京东、天猫到抖音电商,各大电商平台纷纷亮出亮眼成绩单,不仅展现了中国消费市场的强劲活力,更揭示了消费趋势的深刻变革。羊小咩作为新兴的消费服务
Mysql用户密码设置修改和权限分配
转载地址:http://www.cnblogs.com/top5/archive/2010/09/14/1825571.html, 复制记录下:一、更改密码  第一种方式:  1、更改之前root没有密码的情况    c:mysqlbinmysqladmin -u root password "yo
如何增加已上架宝贝销售规格
一、如何增加已上架宝贝销售规格?要增加已上架宝贝的销售规格,可以按照以下步骤进行:登录淘宝卖家平台:打开淘宝网站,点击页面右上方的“卖家中心”,选择“卖家后台”,输入账号密码登录。选择需要添加规格的商品:在卖家后台首页,点
怎么使用AI写作工具批量写作?批量AI智能写作的方法
随着科技的不断发展,人工智能(AI)技术在各个领域都有了广泛的应用,其中之一就是智能写作。对于需要大量文本创作的用户来说,批量AI智能写作成为提高效率的一项重要工具。本文将专心分享批量AI智能写作的
福昕PDF编辑器 13.3.624.26728
福昕pdf编辑器个人版是一款便捷实用、功能丰富的文档编辑工具,它拥有启动速度快、浏览迅速、内存占用小等多个优点,不仅可以浏览各种pdf文件,还能编辑pdf文档的页面内容,进行插入、修改、移除、旋转、复制等操作,使用起来非常的方便。
适当使用关键词,避免堆砌,优化独立站的SEO
在当今数字化时代,拥有一个独立网站已成为许多企业和个人展现自我的重要途径。然而,创建一个成功的网站仅仅是第一步,如何提升其可见性,尤其是在搜索引擎中的排名,显得尤为重要。这就是搜索引擎优化(SEO)的魅力所在。小编今天将为大
网购的口气清新剂竟是电子烟?电子烟乱象难禁,未成年人成最大受害者
未成年的儿子在正规网购平台购买了一款名为“口腔喷雾清新剂”的产品,吸食后直呼“味道真甜”,并吐出香精味的烟雾。陈女士仔细检查才发现,这竟是一款伪装成清新剂的电子烟。近年来,电子烟因其“低门槛”和隐蔽性成为市场乱象的重灾区。
许昌网站排名优化软件,提升网站排名的利器,许昌正规网站优化公司
许昌网站排名优化软件是提升网站排名的利器,通过专业的优化技巧和策略,帮助网站在搜索引擎中获得更好的排名。许昌正规网站优化公司则提供全方位的网站优化服务,包括关键词研究、内容优化、链接建设等,确保网站在搜索引擎中获得更高的曝
小米Note 3与小米6全面对比:升级澎湃OS后的差异体验(2024版)
从价格维度来看,小米Note3和小米6的价格水平大体相当。但当我们深入探讨其硬件配置时,便会发现两者之间存在诸多差异。在硬件核心方面,小米Note3和小米6主要区别在于屏幕大小、处理器、前置摄像头、电池容量以及人脸解锁功能。简单来说,
相关文章
推荐文章
发表评论
0评