Sha256: fcc4524fc9d9b1f485f38df409d7c2df6b4ef3a671eeeed5e5adf02eb75d0831
Contents?: true
Size: 1.3 KB
Versions: 18
Compression:
Stored size: 1.3 KB
Contents
<!DOCTYPE html> <html lang="en"> <head> <title>Ajax-Chosen: Bootstrapping a Popular jQuery Plugin to add Ajax Autocomplete</title> <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script> <script type="text/javascript" src="/dist/chosen/chosen/chosen.jquery.min.js"></script> <script type="text/javascript" src="/lib/ajax-chosen.js"></script> <link type="text/css" rel="stylesheet" href="/dist/chosen/chosen/chosen.css" /> <style type="text/css"> #example1, #example2, #example3 { width: 300px; display: block; } </style> <script type="text/javascript"> $(document).ready(function () { $("#example1,#example2,#example3").ajaxChosen({ type: 'GET', url: '/data.json', dataType: 'json' }, function (data) { var terms = {}; $.each(data.states, function (i, val) { terms[i] = val; }); return terms; }); }); </script> </head> <body> <h1>Ajax-Chosen: Bootstrapping a jQuery Plugin</h1> <div> <h2>Multi Select</h2> <select id="example1" title="Search for a state" multiple></select><br /><br /> <select id="example3" title="Search for a state" multiple></select> </div> <div> <h2>Single Select</h2> <select id="example2" title="Select for a state" search><option></option></select> </div> </body> </html>
Version data entries
18 entries across 18 versions & 1 rubygems