Skip to content

Instantly share code, notes, and snippets.

@tamboer
Last active December 14, 2015 21:59
Show Gist options
  • Save tamboer/5155055 to your computer and use it in GitHub Desktop.
Save tamboer/5155055 to your computer and use it in GitHub Desktop.
jQuery basics
$(function() {
$('#datatable').dataTable( {
//"bSort": false
} );
// ##### DATA TABLE COLUMN FILTER ###### //
// if($('#datatable').length > 0){
// $('#datatable').dataTable().columnFilter();
// }
$( "#accordion" ).accordion();
var availableTags = [
"Overnight","Holiday","Business","Vacation","Excursions",
];
$( "#autocomplete" ).autocomplete({
source: availableTags
});
$( "#button" ).button();
$( "#radioset" ).buttonset();
$( "#tabs" ).tabs();
$( "#dialog" ).dialog({
autoOpen: false,
width: 400,
buttons: [
{
text: "Ok",
click: function() {
$( this ).dialog( "close" );
}
},
{
text: "Cancel",
click: function() {
$( this ).dialog( "close" );
}
}
]
});
// Link to open the dialog
$( "#dialog-link" ).click(function( event ) {
$( "#dialog" ).dialog( "open" );
event.preventDefault();
});
$( "#datepicker" ).datepicker({
inline: true
});
$( "#slider" ).slider({
range: true,
values: [ 17, 67 ]
});
$( "#progressbar" ).progressbar({
value: 20
});
// Hover states on the static widgets
$( "#dialog-link, #icons li" ).hover(
function() {
$( this ).addClass( "ui-state-hover" );
},
function() {
$( this ).removeClass( "ui-state-hover" );
}
);
$('.carousel').carousel({
interval: 3000
})
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment