select_responsive.html 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494
  1. <!DOCTYPE html>
  2. <html xmlns="http://www.w3.org/1999/xhtml">
  3. <head>
  4. <title></title>
  5. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  6. <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js"></script>
  7. <script src="jquery.sumoselect.js"></script>
  8. <link href="sumoselect.css" rel="stylesheet" />
  9. <script type="text/javascript">
  10. $(document).ready(function () {
  11. window.asd = $('.SlectBox').SumoSelect({ csvDispCount: 3, captionFormatAllSelected: "Yeah, OK, so everything." });
  12. window.test = $('.testsel').SumoSelect({okCancelInMulti:true, captionFormatAllSelected: "Yeah, OK, so everything." });
  13. window.testSelAll = $('.testSelAll').SumoSelect({okCancelInMulti:true, selectAll:true });
  14. window.testSelAlld = $('.SlectBox-grp').SumoSelect({okCancelInMulti:true, selectAll:true });
  15. window.testSelAll2 = $('.testSelAll2').SumoSelect({selectAll:true });
  16. window.Search = $('.search-box').SumoSelect({ csvDispCount: 3, search: true, searchText:'Enter here.' });
  17. window.searchSelAll = $('.search-box-sel-all').SumoSelect({ csvDispCount: 3, selectAll:true, search: true, searchText:'Enter here.', okCancelInMulti:true });
  18. window.searchSelAll = $('.search-box-open-up').SumoSelect({ csvDispCount: 3, selectAll:true, search: false, searchText:'Enter here.', up:true });
  19. window.groups_eg_g = $('.groups_eg_g').SumoSelect({selectAll:true, search:true });
  20. });
  21. </script>
  22. <style type="text/css">
  23. body{font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;color:#444;font-size:13px;}
  24. p,div,ul,li{padding:0px; margin:0px;}
  25. </style>
  26. </head>
  27. <body>
  28. <h1>Simple</h1>
  29. &nbsp;&nbsp;&nbsp;
  30. <select name="somename" class="SlectBox" onclick="console.log($(this).val())" onchange="console.log('change is firing')">
  31. <option disabled="disabled" selected="selected">disabled selected</option>
  32. <!--placeholder-->
  33. <option value="volvo">Volvo</option>
  34. <option value="saab">Saab</option>
  35. <option value="mercedes">Mercedes</option>
  36. <option value="audi">Audi</option>
  37. </select>
  38. &nbsp;&nbsp;&nbsp;
  39. <select class="SlectBox" disabled >
  40. <option value="volvo">Volvo</option>
  41. <option selected value="saab">Saab</option>
  42. <option value="mercedes">Mercedes</option>
  43. <option value="audi">Audi</option>
  44. <option disabled value="opt1">option1</option>
  45. <option value="opt2">option2</option>
  46. <option value="opt3">option3</option>
  47. </select>
  48. &nbsp;&nbsp;&nbsp;
  49. <select class="SlectBox" placeholder="this is placeholder">
  50. <option selected="selected">selected</option>
  51. <option>Volvo</option>
  52. <option>Saab</option>
  53. <option value="mercedes">Mercedes</option>
  54. <option value="audi">Audi</option>
  55. </select>
  56. &nbsp;&nbsp;&nbsp;
  57. This is a inline select element
  58. <select class="SlectBox" placeholder="this is placeholder" required="required">
  59. <option selected="selected">selected</option>
  60. <option>Volvo</option>
  61. <option>Saab</option>
  62. <option value="mercedes">Mercedes</option>
  63. <option value="audi">Audi</option>
  64. <option>Volvo</option>
  65. <option>Saab</option>
  66. <option value="mercedes">Mercedes</option>
  67. <option value="audi">Audi</option>
  68. <option>Volvo</option>
  69. <option>Saab</option>
  70. <option value="mercedes">Mercedes</option>
  71. <option value="audi">Audi</option>
  72. <option>Volvo</option>
  73. <option>Saab</option>
  74. <option value="mercedes">Mercedes</option>
  75. <option value="audi">Audi</option>
  76. </select>
  77. <h1>Multiple</h1>
  78. <form method="get">
  79. &nbsp;&nbsp;&nbsp;
  80. &nbsp;&nbsp;&nbsp; This is a inline select element
  81. <select multiple="multiple" placeholder="Hello im from placeholder" class="SlectBox" required>
  82. <option value="volvo">Volvo</option>
  83. <option value="saab">Saab</option>
  84. <option value="mercedes">Mercedes</option>
  85. <option value="audi">Audi</option>
  86. <option value="bmw">BMW</option>
  87. </select>
  88. <div class="SumoSelect">
  89. <p class="CaptionCont SlectBoxa"><span>disabled selected</span><label><i></i></label></p>
  90. <div class="optWrapper multiple">
  91. <ul class="options">
  92. <li><span><i></i></span>
  93. <label>Volvo</label></li>
  94. <li><span><i></i></span>
  95. <label>saab</label></li>
  96. <li><span><i></i></span>
  97. <label>audi</label></li>
  98. <li><span><i></i></span>
  99. <label>bmw</label></li>
  100. <li><span><i></i></span>
  101. <label>porsche</label></li>
  102. <li><span><i></i></span>
  103. <label>ferrari</label></li>
  104. <li class="selected"><span><i></i></span>
  105. <label>hyundai</label></li>
  106. <li><span><i></i></span>
  107. <label>porsche</label></li>
  108. <li><span><i></i></span>
  109. <label>ferrari</label></li>
  110. <li><span><i></i></span>
  111. <label>hyundai is a good company but not too go0d !!!</label></li>
  112. <li><span><i></i></span>
  113. <label>porsche</label></li>
  114. <li><span><i></i></span>
  115. <label>ferrari</label></li>
  116. <li><span><i></i></span>
  117. <label>hyundai</label></li>
  118. </ul>
  119. </div>
  120. </div>
  121. <input type="submit" value="submit" />
  122. <br />
  123. <br />
  124. <br /> &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;
  125. <select multiple="multiple" placeholder="Hello im from placeholder" class="testsel">
  126. <option selected value="volvo">Volvo</option>
  127. <option value="saab">Saab</option>
  128. <option disabled="disabled" value="mercedes">Mercedes</option>
  129. <option value="audi">Audi</option>
  130. <option value="bmw">BMW</option>
  131. <option value="porsche">Porche</option>
  132. <option value="ferrari">Ferrari</option>
  133. <option class="someclass" value="audi">Audi</option>
  134. <option class="someclass" value="bmw">BMW</option>
  135. <option class="someclass" value="porsche">Porche</option>
  136. <option value="ferrari">Ferrari</option>
  137. <option value="audi">Audi</option>
  138. <option value="bmw">BMW</option>
  139. <option value="porsche">Porche</option>
  140. <option value="ferrari">Ferrari</option>
  141. <option value="hyundai">Hyundai</option>
  142. <option value="mitsubishi">Mitsubishi</option>
  143. </select>
  144. </form>
  145. <br>
  146. <h1>Select all option</h1>
  147. &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;
  148. <select multiple="multiple" placeholder="Hello im from placeholder" onchange="console.log($(this).children(':selected').length)" class="testSelAll">
  149. <option selected value="volvo">Volvo</option>
  150. <option value="saab">Saab</option>
  151. <option disabled="disabled" value="mercedes">Mercedes</option>
  152. <option value="audi">Audi</option>
  153. <option selected value="bmw">BMW</option>
  154. <option value="porsche">Porche</option>
  155. <option value="ferrari">Ferrari</option>
  156. <option value="mitsubishi">Mitsubishi</option>
  157. </select>
  158. &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;
  159. <select multiple="multiple" placeholder="Hello im from placeholder" onchange="console.log($(this).children(':selected').length)" class="testSelAll2">
  160. <option selected value="volvo">Volvo</option>
  161. <option value="saab">Saab</option>
  162. <option disabled="disabled" value="mercedes">Mercedes</option>
  163. <option value="audi">Audi</option>
  164. <option selected value="bmw">BMW</option>
  165. <option value="porsche">Porche</option>
  166. <option value="ferrari">Ferrari</option>
  167. <option value="mitsubishi">Mitsubishi</option>
  168. </select>
  169. <h1>Groups</h1>
  170. <select multiple="multiple" placeholder="Hello im from placeholder" class="SlectBox-grp">
  171. <option selected value="saab">Saab</option>
  172. <option value="opel">Opel</option>
  173. <option disabled="disabled" value="mercedez">Mercedez</option>
  174. <optgroup label="US Brands">
  175. <option value="chrysler">Chrysler</option>
  176. <option value="gm">General Motors</option>
  177. <option value="ford">Ford</option>
  178. <option disabled="disabled" value="plymouth">Plymouth</option>
  179. </optgroup>
  180. <optgroup label="French Brands">
  181. <option value="citroen">Citroën</option>
  182. <option value="peugeot">Peugeot</option>
  183. <option selected value="renault">Renault</option>
  184. <option value="nissan">Nissan</option>
  185. </optgroup>
  186. <optgroup label="Italian brands">
  187. <option value="fiat">Fiat</option>
  188. <option value="alpha-Romeo">Alpha Romeo</option>
  189. <option value="lamborghini">Lamborghini</option>
  190. </optgroup>
  191. <optgroup disabled="disabled" label="German brands">
  192. <option value="audi">Audi</option>
  193. <option value="bMW">BMW</option>
  194. <option value="volkswagen">Volkswagen</option>
  195. </optgroup>
  196. <option value="aston-martin">Aston Martin</option>
  197. <option value="hyundai">Hyundai</option>
  198. <option value="mitsubishi">Mitsubishi</option>
  199. </select>
  200. <select placeholder="Hello im from placeholder" class="SlectBox">
  201. <option selected value="saab">Saab</option>
  202. <option value="opel">Opel</option>
  203. <option disabled="disabled" value="mercedez">Mercedez</option>
  204. <optgroup label="US Brands">
  205. <option value="chrysler">Chrysler</option>
  206. <option value="gm">General Motors</option>
  207. <option value="ford">Ford</option>
  208. <option disabled="disabled" value="plymouth">Plymouth</option>
  209. </optgroup>
  210. <optgroup label="French Brands">
  211. <option value="citroen">Citroën</option>
  212. <option value="peugeot">Peugeot</option>
  213. <option selected value="renault">Renault</option>
  214. <option value="nissan">Nissan</option>
  215. </optgroup>
  216. <optgroup label="Italian brands">
  217. <option value="fiat">Fiat</option>
  218. <option value="alpha-Romeo">Alpha Romeo</option>
  219. <option value="lamborghini">Lamborghini</option>
  220. </optgroup>
  221. <optgroup disabled="disabled" label="German brands">
  222. <option value="audi">Audi</option>
  223. <option value="bMW">BMW</option>
  224. <option value="volkswagen">Volkswagen</option>
  225. </optgroup>
  226. <option value="aston-martin">Aston Martin</option>
  227. <option value="hyundai">Hyundai</option>
  228. <option value="mitsubishi">Mitsubishi</option>
  229. </select>
  230. <select placeholder="Hello im from placeholder" class="groups_eg">
  231. <option class="hemant" selected value="saab">Saab</option>
  232. <option class="hemant" value="opel">Opel</option>
  233. <option disabled="disabled" value="mercedez">Mercedez</option>
  234. <optgroup label="US Brands">
  235. <option value="chrysler">Chrysler</option>
  236. <option value="gm">General Motors</option>
  237. <option value="ford">Ford</option>
  238. <option disabled="disabled" value="plymouth">Plymouth</option>
  239. </optgroup>
  240. <optgroup label="French Brands">
  241. <option value="citroen">Citroën</option>
  242. <option value="peugeot">Peugeot</option>
  243. <option selected value="renault">Renault</option>
  244. <option value="nissan">Nissan</option>
  245. </optgroup>
  246. <optgroup disabled="disabled" label="German brands">
  247. <option value="audi">Audi</option>
  248. <option value="bMW">BMW</option>
  249. <option value="volkswagen">Volkswagen</option>
  250. </optgroup>
  251. <optgroup label="Italian brands">
  252. <option value="fiat">Fiat</option>
  253. <option value="alpha-Romeo">Alpha Romeo</option>
  254. <option value="lamborghini">Lamborghini</option>
  255. </optgroup>
  256. <option value="aston-martin">Aston Martin</option>
  257. <option value="hyundai">Hyundai</option>
  258. <option value="mitsubishi">Mitsubishi</option>
  259. </select>
  260. <select multiple="multiple" placeholder="Hello im from placeholder" class="groups_eg_g">
  261. <option class="hemant" selected value="saab">Saab</option>
  262. <option class="hemant" value="opel">Opel</option>
  263. <option disabled="disabled" value="mercedez">Mercedez</option>
  264. <optgroup label="US Brands">
  265. <option value="chrysler">Chrysler</option>
  266. <option value="gm">General Motors</option>
  267. <option value="ford">Ford</option>
  268. <option disabled="disabled" value="plymouth">Plymouth</option>
  269. </optgroup>
  270. <optgroup label="French Brands">
  271. <option value="citroen">Citroën</option>
  272. <option value="peugeot">Peugeot</option>
  273. <option selected value="renault">Renault</option>
  274. <option value="nissan">Nissan</option>
  275. </optgroup>
  276. <optgroup disabled="disabled" label="German brands">
  277. <option value="audi">Audi</option>
  278. <option value="bMW">BMW</option>
  279. <option value="volkswagen">Volkswagen</option>
  280. </optgroup>
  281. <optgroup label="Italian brands">
  282. <option value="fiat">Fiat</option>
  283. <option value="alpha-Romeo">Alpha Romeo</option>
  284. <option value="lamborghini">Lamborghini</option>
  285. </optgroup>
  286. <option value="aston-martin">Aston Martin</option>
  287. <option value="hyundai">Hyundai</option>
  288. <option value="mitsubishi">Mitsubishi</option>
  289. </select>
  290. <h1>Search</h1>
  291. <select placeholder="Hello im from placeholder" class="search-box">
  292. <option class="hemant" selected value="saab">Saab</option>
  293. <option class="hemant" value="opel">Opel</option>
  294. <option disabled="disabled" value="mercedez">Mercedez</option>
  295. <optgroup label="US Brands">
  296. <option value="chrysler">Chrysler</option>
  297. <option value="gm">General Motors</option>
  298. <option value="ford">Ford</option>
  299. <option disabled="disabled" value="plymouth">Plymouth</option>
  300. </optgroup>
  301. <optgroup label="French Brands">
  302. <option value="citroen">Citroën</option>
  303. <option value="peugeot">Peugeot</option>
  304. <option selected value="renault">Renault</option>
  305. <option value="nissan">Nissan</option>
  306. </optgroup>
  307. <optgroup label="Italian brands">
  308. <option value="fiat">Fiat</option>
  309. <option value="alpha-Romeo">Alpha Romeo</option>
  310. <option value="lamborghini">Lamborghini</option>
  311. </optgroup>
  312. <optgroup disabled="disabled" label="German brands">
  313. <option value="audi">Audi</option>
  314. <option value="bMW">BMW</option>
  315. <option value="volkswagen">Volkswagen</option>
  316. </optgroup>
  317. <option value="aston-martin">Aston Martin</option>
  318. <option value="hyundai">Hyundai</option>
  319. <option value="mitsubishi">Mitsubishi</option>
  320. </select>
  321. <select placeholder="Hello im from placeholder" class="search-box">
  322. <option class="hemant" selected value="saab">Saab</option>
  323. <option class="hemant" value="opel">Opel</option>
  324. <option disabled="disabled" value="mercedez">Mercedez</option>
  325. <option value="aston-martin">Aston Martin</option>
  326. <option value="hyundai">Hyundai</option>
  327. <option value="mitsubishi">Mitsubishi</option>
  328. </select>
  329. <select multiple="multiple" placeholder="Hello im from placeholder" onchange="console.log($(this).children(':selected').length)" class="search-box">
  330. <option selected value="volvo">Volvo</option>
  331. <option value="saab">Saab</option>
  332. <option disabled="disabled" value="mercedes">Mercedes</option>
  333. <option value="audi">Audi</option>
  334. <option selected value="bmw">BMW</option>
  335. <option value="porsche">Porche</option>
  336. <option value="ferrari">Ferrari</option>
  337. <option value="mitsubishi">Mitsubishi</option>
  338. </select>
  339. <h1>Over flow hidden test</h1>
  340. <style type="text/css">
  341. .sumo_name_will_become_class{
  342. position: absolute;
  343. }
  344. </style>
  345. <div style="background:#ccc; width:100px; height: 200px; overflow: hidden;">
  346. <select name="name_will_become_class" multiple="multiple" placeholder="Hello im from placeholder" onchange="console.log($(this).children(':selected').length)" class="search-box-sel-all">
  347. <option selected value="volvo">Volvo</option>
  348. <option value="saab">Saab</option>
  349. <option value="mercedes">Mercedes</option>
  350. <option value="audi">Audi</option>
  351. <option selected value="bmw">BMW</option>
  352. <option value="porsche">Porche</option>
  353. <option value="ferrari">Ferrari</option>
  354. <option value="mitsubishi">Mitsubishi</option>
  355. </select>
  356. </div>
  357. <h1>Open upside</h1>
  358. <select multiple="multiple" placeholder="Hello im from placeholder"
  359. onchange="console.log($(this).val())"
  360. class="search-box-open-up">
  361. <option selected value='"volvo"'>Volvo</option>
  362. <option value="saab">Saab</option>
  363. <option value="mercedes">Mercedes</option>
  364. <option value="audi">Audi</option>
  365. <option selected value="bmw">BMW</option>
  366. <option value="porsche">Porche</option>
  367. <option value="ferrari">Ferrari</option>
  368. <option value="mitsubishi">Mitsubishi</option>
  369. </select>
  370. <br />
  371. <br />
  372. <br /> <br />
  373. <br />
  374. <br /> <br />
  375. <br />
  376. <br /> <br />
  377. <br />
  378. <br /> <br />
  379. <br />
  380. <br /> <br />
  381. <br />
  382. <br /> <br />
  383. <br />
  384. <br /> <br />
  385. <br />
  386. <select multiple="multiple" name="somename10" class="testselect10">
  387. <option value="volvo">Volvo</option>
  388. <option >Saab</option>
  389. <option disabled="disabled" value="mercedes">Mercedes</option>
  390. <option value="audi">Audi</option>
  391. <option value="bmw">BMW</option>
  392. <option disabled="disabled" value="porsche">Porche</option>
  393. <option selected="selected" value="ferrari">Ferrari</option>
  394. <option selected="selected" value="hyundai">Hyundai</option>
  395. <option value="mitsubishi">Mitsubishi</option>
  396. </select>
  397. <table class="auto-style5">
  398. <tr>
  399. <td class="auto-style6">
  400. <ul><li>
  401. <input id="Button1" type="button" value="Attach SumoSelect" onclick="$('.testselect10').SumoSelect();" />
  402. </li>
  403. <li>
  404. <input id="Button2" type="button" value="Detach SumoSelect" onclick="$('.testselect10')[0].sumo.unload();" />
  405. </li>
  406. <li>
  407. <input id="Button3" type="button" value="Add item at index 1" onclick="$('.testselect10')[0].sumo.add('New Item',1);" />
  408. </li>
  409. <li>
  410. <input id="Button4" type="button" value="Remove item at index 1" onclick="$('.testselect10')[0].sumo.remove(1);" />
  411. </li>
  412. <li>
  413. <input id="Button5" type="button" value="Select item at index 1" onclick="$('.testselect10')[0].sumo.selectItem(1);" />
  414. </li>
  415. <li>
  416. <input id="Button6" type="button" value="UnSelect item at index 1" onclick="$('.testselect10')[0].sumo.unSelectItem(1);" />
  417. </li>
  418. <li>
  419. <input id="Button7" type="button" value="Disable item at index 1" onclick="$('.testselect10')[0].sumo.disableItem(1);" />
  420. </li>
  421. <li>
  422. <input id="Button8" type="button" value="Enable item at index 1" onclick="$('.testselect10')[0].sumo.enableItem(1);" />
  423. </li>
  424. <li>
  425. <input id="Button9" type="button" value="Toggle Enable disable" onclick="$('.testselect10')[0].sumo.disabled = !$('.testselect10')[0].sumo.disabled" />
  426. </li>
  427. </ul>
  428. <br />
  429. <br /> <br />
  430. <br />
  431. <br /> <br />
  432. <br />
  433. <br /> <br />
  434. <br />
  435. <br /> <br />
  436. <br />
  437. <br /> <br />
  438. <br />
  439. <br /> <br />
  440. <br />
  441. <br /> <br />
  442. <br />
  443. </td>
  444. <td>
  445. </td>
  446. </tr>
  447. </table>
  448. </body>
  449. </html>