我正在尝试根据用户导航的位置制作不同的动画,但这不起作用。谢谢!
<?php
$ref =$_SERVER['REQUEST_URI'];
?>
<script type="text/javascript">
if(<?php $ref; ?>) == 'http://livvedesign.com/content/philosophy.php/'){
$('#wrapper1').css('left','-150vw');
$('#wrapper1').delay(500).animate({left:'0vw', opacity:1}, 800);
};
if(<?php $ref;?> == 'http://livvedesign.com/content/meet.php/'){
$('#wrapper1').css('left','150vw');
$('#wrapper1').delay(500).animate({left:'0vw', opacity:1}, 800);
};
if(<?php $ref;?> == 'http://livvedesign.com/content/contact2.php/'){
$('#wrapper1').css('top','250vh');
$('#wrapper1').delay(500).animate({top:'0vh', opacity:1}, 800);
};
if(<?php echo $ref;?> == 'http://livvedesign.com/content/projects.php'){
$('#wrapper1').css('top','250vh');
$('#wrapper1').delay(500).animate({top:'0vh', opacity:1}, 800);
};
if(<?php $ref ?> == "" || <?php $ref ?> == 'index.php') {$('#wrapper1').animate({opacity:1}, 700);};
</script>