Showing posts with label example. Show all posts
Showing posts with label example. Show all posts

Friday 10 October 2014

Autocomplete JQuery script full source code example

<script src="http://www.jqueryautocomplete.com/js/jquery/jquery-1.7.1.min.js"></script>
<script src="http://www.jqueryautocomplete.com/js/jquery/jquery.ui.core.min.js"></script>
<script src="http://www.jqueryautocomplete.com/js/jquery/jquery.ui.widget.min.js"></script>
<script src="http://www.jqueryautocomplete.com/js/jquery/jquery.ui.position.min.js"></script>
<script src="http://www.jqueryautocomplete.com/js/jquery/jquery.ui.autocomplete.min.js"></script>
<link rel="stylesheet" href="http://www.jqueryautocomplete.com/js/jquery/smoothness/jquery-ui-1.8.16.custom.css"/>
<script>var data = [
  {"label" : "Aragorn"},
  {"label" : "Arwen"},
  {"label" : "Bilbo Baggins"},
  {"label" : "Boromir"},
  {"label" : "Frodo Baggins"},
  {"label" : "Gandalf"},
  {"label" : "Gimli"},
  {"label" : "Gollum"},
  {"label" : "Legolas"},
  {"label" : "Meriadoc Merry Brandybuck"},
  {"label" : "Peregrin Pippin Took"},
  {"label" : "Samwise Gamgee"}
  ];
</script>
<script>
$(function() {

 $( "#search" ).autocomplete(
 {
   source:data
 })
});
</script>

<input type="text" id="search" />

Tuesday 12 August 2014

Datatable jQuery Plugin set order example

$(document).ready(function() {
    $('#example').dataTable( {
        "order": [[ 3, "desc" ]]
    } );
} );
Plugin files:
//code.jquery.com/jquery-1.11.1.min.js
//cdn.datatables.net/1.10.2/js/jquery.dataTables.min.js