Thread: Example 3-4
View Single Post
  #1 (permalink)  
Old November 8th, 2018, 12:36 AM
Don1 Don1 is offline
Registered User
Points: 5, Level: 1
Points: 5, Level: 1 Points: 5, Level: 1 Points: 5, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Nov 2018
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Example 3-4

It doesn't look like there's much interest in this book but I'll post my issues anyway.

Chapter 3, example 4 contains the following line of code:

$('div#finderFiles div.finderNode:first').trigger('click');

which only works on my system (i.e, highlights the first finderNode and its child) if said line of code follows the call to applyEventHandler(). In the book, $('div#finderFiles div.finderNode:first').trigger('click') precedes applyEventHandler().

Also, I would expect the named event ('click.finder') needs to be used in order to call the 'click.finder' event handler; i.e:

$('div#finderFiles div.finderNode:first').trigger('click.finder');

However, both 'click.finder' and 'click' call the 'click.finder' event handler.

Perhaps someone can lift the fog for me.

Thanks,
Don
Reply With Quote