Home >Web Front-end >JS Tutorial >Chosen How to use the jquery-based selection box plug-in_jquery

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

WBOY
WBOYOriginal
2016-05-16 17:53:011693browse

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();
Statement:
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