Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trigger Event on Page Load? #75

Open
lonnieezell opened this issue Dec 7, 2014 · 0 comments
Open

Trigger Event on Page Load? #75

lonnieezell opened this issue Dec 7, 2014 · 0 comments

Comments

@lonnieezell
Copy link

@paltman Sorry - not sure where else to ask questions and the issue that was similar to this went has gone unanswered for a while.

My javascript skills aren't the strongest. I'm more of a PHP guy.

Is it possible to trigger an event on page load? Let's say I'm serving a static HTML file, but I have a bit that I want to refresh. I would assume I could simply trigger the eldarion-ajax:success event on that element, but it doesn't seem to be working currently.

<div id="loading-bay" class="refresh-on-load" data-refresh-url="/test/baytwo" class="ajax">
    This is the loading bay.
</div>

<script>
    $(document).ready(function() {
        $('.refresh-on-load').trigger('eldarion-ajax:success');
    });
</script>

Is this correct?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant