Skip to content

afterOpen and afterClose are both firing on page load #89

Open
@kyleatblackfoot

Description

@kyleatblackfoot

hey guys, I have a couple functions at the bottom of my js file.

function openBurg() { console.log('open'); } function closeBurg() { console.log('close'); }

I'm using them when calling bigSlide

$j('.artclose').bigSlide({ 'side': 'right', 'afterOpen': openBurg(), 'afterClose': closeBurg() });

The console.log is just to for me to see when it will call, both are calling on page load

Edit: I managed to fix this by using a function around the function like so: function(){openBurg();} in the bigSlide settings. This is most likely my lack of understanding around some javascript syntax.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions