
Untitled
By: a guest on
May 4th, 2012 | syntax:
None | size: 1.67 KB | hits: 12 | expires: Never
how can I run a piece of jQuery/ajax when a certain php variable = 1?
if $add_total > < $available_achievement_1 { $achievement_1 = '1' }
if $achievement_1 == '1' {
query submit achievement to users database
}
else {}
<script type="text/javascript">
$(function() {
var notice = '<div class="notice">'
+ '<div class="notice-body">'
+ '<img src="core/displays/notify/achievement-icon.png" alt="" />'
+ '<h3>Achievement item</h3>'
+ '<p>details.</p>'
+ '</div>'
+ '<div class="notice-bottom">'
+ '</div>'
+ '</div>';
$ny( notice ).purr(
{
usingTransparentPNG: true
}
);
});
</script>
if $add_total > < $available_achievement_1 { $achievement_1 = '1' }
if $achievement_1 == '1' {
query submit achievement to users database
?>
<script type="text/javascript">
$(function() {
var notice = '<div class="notice">'
+ '<div class="notice-body">'
+ '<img src="core/displays/notify/achievement-icon.png" alt="" />'
+ '<h3>Achievement item</h3>'
+ '<p>details.</p>'
+ '</div>'
+ '<div class="notice-bottom">'
+ '</div>'
+ '</div>';
$ny( notice ).purr(
{
usingTransparentPNG: true
}
);
});
</script>
<?PHP
}
else {}