• Resolved robbiet63

    (@robbiet63)


    Hello,

    Using Collapse-O-Matic roll-your-own and the Head and Footer Scripts Inserter, is it possible to create an onclick event? – I am not getting a response with the following:

    <script type="text/javascript">
    jquery("body").on('click', ".collapseomatic", function(){
        alert("Clicked");
    });
    </script>

    Thanks,
    Rob

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author twinpictures

    (@twinpictures)

    This is a built in feature of Collapse-Pro-Matic, alowing you to add javascript to trigger on Expand, Collapse, and Expand/Collapse Events.

    If you want to roll this on your own, try:

    <script type="text/javascript">
    	jQuery(document).on('click', '.collapseomatic', function(event) {
                alert('Clicked');
            });
    </script>
    
    Thread Starter robbiet63

    (@robbiet63)

    Works! Thank you!

    Plugin Author twinpictures

    (@twinpictures)

    sweet. issue marked as resolved.
    open a new thread should you require further assistance.
    make it a great day!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘jquery onclick for Collapse-O-Matic?’ is closed to new replies.