Added Logo Animation
This commit is contained in:
Binary file not shown.
|
Before Width: | Height: | Size: 190 KiB |
BIN
www/images/logo_animated.gif
Normal file
BIN
www/images/logo_animated.gif
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 205 KiB |
BIN
www/images/logo_static.png
Normal file
BIN
www/images/logo_static.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 6.7 KiB |
20
www/javascript/scripts.js
Normal file
20
www/javascript/scripts.js
Normal file
@@ -0,0 +1,20 @@
|
||||
/*
|
||||
* Animate Header Image
|
||||
* on MouseEnter()
|
||||
*
|
||||
*/
|
||||
$(function(){
|
||||
var img_a = new Image();
|
||||
img_a.src ='/images/logo_animated.gif';
|
||||
var img_s = new Image();
|
||||
img_s.src ='/images/logo_static.png';
|
||||
$('.brandLogo').mouseenter(function(){
|
||||
if ($('.brandLogo').attr('src') === img_a.src)
|
||||
return;
|
||||
|
||||
$(this).attr('src',img_a.src);
|
||||
setTimeout(function() {
|
||||
$('.brandLogo').attr('src',img_s.src);
|
||||
}, 3500);
|
||||
});
|
||||
});
|
||||
@@ -29,7 +29,7 @@
|
||||
|
||||
$this->widget('bootstrap.widgets.TbNavbar',
|
||||
[
|
||||
'brandLabel'=>'<img src="/images/logo.png" class="brandLogo"/>',
|
||||
'brandLabel'=>'<img src="/images/logo_static.png" class="brandLogo"/>',
|
||||
'brandUrl'=>'/',
|
||||
'display' => null,
|
||||
'htmlOptions' =>
|
||||
@@ -96,5 +96,6 @@
|
||||
<script src="<?php echo (YII_DEBUG ? 'bootstrap.js' : 'bootstrap.min.js') ?>"></script>
|
||||
<script src="js/plugins.js"></script>
|
||||
<script src="js/main.js"></script>
|
||||
<script src="javascript/scripts.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user