You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
semantic.header = {};
// ready event
semantic.header.ready = function() {
// selector cache
var $increaseFont = $('.font .increase'), $decreaseFont = $('.font .decrease'),
// alias
handler ;
// event handlers
handler = { font: {
increase: function() { var $container = $(this).parent().next('.ui.segment'), fontSize = parseInt( $container.css('font-size'), 10) ; $container .css('font-size', fontSize + 1) ; }, decrease: function() { var $container = $(this).parent().next('.ui.segment'), fontSize = parseInt( $container.css('font-size'), 10) ; $container .css('font-size', fontSize - 1) ; } } };
$increaseFont .on('click', handler.font.increase) ; $decreaseFont .on('click', handler.font.decrease) ;
};
// attach ready event
$(document) .ready(semantic.header.ready) ;
|