Skip to content

Commit

Permalink
[WebUI IntelliHome#7] Added ajax request functions
Browse files Browse the repository at this point in the history
  • Loading branch information
skullbocks committed Jul 27, 2014
1 parent 2b4699c commit ef20f81
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions assets/public/js/fuctions_scripts.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
(function (window, $, undefined) {

$(document).ready(function() {
var $command = $('.command');
var $tileDetail = $('.tile-detail');
$command.click(function() {
var $commandPost = $.post($(this).attr("data-post"),function( data ) {
$( this ).toggleClass( "tile-status-on", data.result );
}, "json");
});
$tileDetail.click(function() {
window.location.href = this.attr("data-post");
});
});
})(window, jQuery);

0 comments on commit ef20f81

Please sign in to comment.