Home > Web Front-end > JS Tutorial > body text

Chosen How to use the jquery-based selection box plug-in_jquery

WBOY
Release: 2016-05-16 17:53:01
Original
1671 people have browsed it

Chosen plug-in download address http://www.jb51.net/jiaoben/38027.html

Copy code The code is as follows:




App JS file
Copy code The code is as follows:



class let this be chzn-select

Initialization: $ (".chzn-select").chosen();

When operating select, please pay attention to the following: first delete the externally applied layer before regular operation, and finally add $(".chzn-select" ).chosen();
Copy code The code is as follows:

var selectObj = $(" #slectplat");
selectObj.parent().children().remove('div');
selectObj.removeClass();
$("#slectplat").val(_plat);
selectObj.addClass("chzn-select");
selectObj.chosen();
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template