I want to perform an animation and a content switch. I have the following code which works perfect outside of my yii2 application.
<script type="text/javascript">
function goto(id, t){
//animate to the div id.
$(".slider_inner_slide")
.animate(
{"left": -($(id).position().left)}, {
duration: 1000,
easing: 'easeInOutCubic'
});
// add active class to the current link
$(t).addClass('active');
}
</script>
<div class="slider_wrapper">
<div class="slider_static-img"></div>
<div class="slider_inner_slide">
<a rel="nofollow" href="" onClick="goto('#slider_right_box', this); return false;" class="active">
<div id="slider_left_box">
<div id="slider_left"></div>
</div>
</a>
<a rel="nofollow" href="" onClick="goto('#slider_left_box', this); return false;" class="active">
<div id="slider_right_box">
<div id="slider_right"></div>
</div>
</a>
</div>
</div>
But when I insert it to one of my views plus adding css and jquery + jquery ui it just reloads the page when I click on the shapes. What can be the problem? Does yii2 have a problem with empty href=""?