Answer the question
In order to leave comments, you need to log in
What is the script conflict?
the script on one page does not work on the site here , when you click on the red + button, the spoiler should open, the script is inserted in the template before the closing body:
<script type="text/javascript">
$('.opening2').click(function(){
$(this).parent().children('div.sp2').toggle('normal');
return false;
});
</script>
$this->document->addScript('catalog/view/javascript/jquery/jquery.tmpl.min.js');
$this->document->addScript('catalog/view/javascript/jquery/jquery.deserialize.min.js');
$this->document->addScript('catalog/view/javascript/jquery/jquery.loadmask.min.js');
$this->document->addScript('catalog/view/javascript/jquery/jquery.lazyload.min.js');
Answer the question
In order to leave comments, you need to log in
I see that after the page is loaded, all catalog items are re-rendered (probably the filter does this), which means that all event handlers are lost.
You can write like this
$('.content').on('click', '.opening2', function(){
$(this).parent().children('div.sp2').toggle('normal');
return false;
});
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question