question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Init event not being triggered.

See original GitHub issue

Required fiddle: http://jsfiddle.net/q3yc3gap/ reproduced here for clarity:

/**
   init event not being triggered
**/

function algo(message) {alert(message)}
algo('works')

$(".slider").on('init', function(){algo("doesn't")});
$(".slider").slick();

/* Alternative cases */

// $(".slider").slick().on('init', function(){algo("doesn't")});
// slide = $(".slider").slick();
// slide.on('init', function(){algo("doesn't")});*/

Issue Analytics

  • State:closed
  • Created 9 years ago
  • Comments:24

github_iconTop GitHub Comments

133reactions
nikolowrycommented, Mar 23, 2015

Please add to the docs that the init listener has to be defined BEFORE the slick object.

19reactions
deviciouscommented, Apr 29, 2016

I’ve found a solution to this problem, just call the on(‘init’) function before the slick function

Read more comments on GitHub >

github_iconTop Results From Across the Web

'init' event not always firing on Lightning component used as ...
'init' event not always firing on Lightning component used as 'New' Action Override? · Navigate to an Account Detail page. · Click on...
Read more >
Event.initEvent() - Web APIs | MDN
The Event.initEvent() method is used to initialize the value of an event created using Document.createEvent().
Read more >
Function inside event listener triggers only on it's initialization
The problem is that the delay function is triggered only once and ignores the change (to false) of the init variable. For example,...
Read more >
initialization event not triggered - SAP Community
initialization event is not triggered while executing my program using transaction code. can you help me. why>?
Read more >
C# Events Not Being Triggered - MSDN - Microsoft
The issue is that you're connecting to the event after it's been raised. Init happens before Load in ASP.NET-land. Hook up your event...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found