jquery Sumoselect Plug-in implementation select drop-down check box

Source: Internet
Author: User

jquery Sumoselect Plugin Implementation Select dropdown check box, which is written by foreign Daniel, refer to the following website:

Http://hemantnegi.github.io/jquery.sumoselect/sumoselect_demo.html Official Demo website
http://hemantnegi.github.io/jquery.sumoselect/official website of the method use instructions.

1. Only need to import JS and CSS, you can directly on the select to add a <select multiple= "multiple" class= "M-wrap span11 positionrank" id= "Positionrank" , the key is multiple= "multiple", you can use this drop-down check box, the way to use the following:


$ (document). Ready (function () {
            $ ('. Slectbox '). Sumoselect ({
			placeholder: ' This is a placeholder ',
			csvdispcount:3 
			});
        
The result of the operation is:


These styles, there are more complex selection of groups, if you want to get the value of the selected values, I am writing to traverse each of the selected, and then use, comma split, passed to the background, and then into the array, the following code: (in the official website does not see the method to get the selected value, a friend know can tell me):

[JavaScript] view plain copy//========== traversal multi-select =============== var positionrankselectspilt = "";   $ ("#positionRank option:selected"). each (function () {positionrankselectspilt + = $ (this). Val () + ",";   });   Multiple selection of ranks remove the last comma positionrankselectspilt = positionrankselectspilt.substring (0,positionrankselectspilt.length-1);   Alert ("Selected:" +positionrankselectspilt); //=====================================

======================== Split Line, December 15, 2016 09:39:53====================

This sumoselect has a very serious bug is that if you use his multi-box control, the drop-down text is actually in the background, assuming that the box above, there is just a button below, will be blocked caused by the click, found not the reason behind the plugin, did not find the reason, This site test is also good, a little do not understand, expect the great God to answer

Note: There are other components:

Controls for multi-marquee:
Selectboxit can be used to replace the ugly and hard-to-use box in HTML with a nice-looking, multi-drop-down option. Twitter's Bootstrap, jQueryUI, and jQuery Mobile themes support Selectboxit. Selectboxit provides first-class support for mobile phones, tablets, and desktop browsers.
http://gregfranko.com/jquery.selectBoxIt.js/


Http://www.oschina.net/news/63891/15-jquery-selectbox-plugins?utm_source=tuicool
http://www.jq22.com/jquery-info11378

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.