-
Notifications
You must be signed in to change notification settings - Fork 0
/
scripts.php
51 lines (48 loc) · 1.4 KB
/
scripts.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
<?php
// Check for valid url
if(!defined('ABSPATH')) {
die("Better luck next time!!!");
}
global $wp_notify;
?>
<!-- ==== Generated by WP-Notify Plugin ==== -->
<script type="text/javascript">
jQuery(document).ready(function() {
<?php if($wp_notify[event] == "mousemove") : ?>
jQuery('body').one('mousemove', showNotify);
<?php elseif ($wp_notify[event] == "onLoad"): ?>
showNotify();
<?php elseif ($wp_notify[event] == "onScroll"): ?>
jQuery(window).one("scroll", showNotify);
<?php endif; ?>
<?php if($wp_notify[style] == "stackoverflow") : ?>
function showNotify() {
jQuery("#notification").fadeIn("slow");
jQuery(".dismiss").click(function(){
jQuery("#notification").fadeOut("slow");
});
}
<?php elseif($wp_notify[style] == "safariAlert") : ?>
jQuery("#notification").css({
top : -(jQuery("#notification").outerHeight()*10),
marginLeft : -(jQuery("#notification").outerWidth()/2),
position : 'fixed',
left : '50%'
});
function showNotify() {
jQuery("#notification").stop().animate({top:0});
jQuery(".dismiss").click(function(){
jQuery("#notification").stop().animate({top:-jQuery("#notification").outerHeight()});
});
}
<?php elseif($wp_notify[style] == "facebook") : ?>
function showNotify() {
jQuery("#notification").fadeIn("slow");
jQuery(".dismiss").click(function(){
jQuery("#notification").fadeOut("slow");
});
}
<?php endif;?>
});
</script>
<!-- ==== Generated by WP-Notify Plugin ==== -->