onclick triggered in javascript

onclick triggered in javascript

  

i want accordion item to be auto clicked by default whenever we render to the page. How to implement javascript in that

Solution

Hi Lovish,

Give the Accordion Item a name, and paste this into an Escaped Content Expression:

"
<script>
$( document ).ready(function() {
        $('#"+ ItemToOpen.Id + " .AccordionVertical___title').click();
    });
</script>
"

ItemToOpen, is the name of your item.

Cheers,

José

Solution

José Costa wrote:

Hi Lovish,

Give the Accordion Item a name, and paste this into an Escaped Content Expression:

"
<script>
$( document ).ready(function() {
        $('#"+ ItemToOpen.Id + " .AccordionVertical___title').click();
    });
</script>
"

ItemToOpen, is the name of your item.

Cheers,

José


thanks jose