我已經創建了一個noty通過javascript其中I中所用的幾個要素:創建在JavaScript的元素,然後使用jQuery動畫
var n = noty({
layout: 'centerRight',
theme: "defaultTheme",
text: "<img class='item' src='images/emark.png' width='30' height='30'/>" + count,
type: 'alert',
template: "<a id='noty' title='Click Here to see all recent alerts' href='alertjquery.html' target='_blank'><div id ='noty_message'><span class='noty_text'></span></div></a>",
closeWith: ['button'],
dismissQueue: true,
timeout: false
});
我用jquery的動畫放大略圖像上:
$('noty').hover(function() {
width = $('.item').width() * zoom;
height = $('.item').height() * zoom;
$(this).find('.item').stop(false, true).animate({ 'width': width, 'height': height, 'top': move, 'left': move }, { duration: 300 });
}
我想要發生的事情是,當您將鼠標懸停在標記爲noty
的noty上時,圖像內部會略微放大。我相信不要緊,我使用它應該工作的noty,通常反正