Possible update

Recommend this page to a friend!

      jQuery Observe  >  All threads  >  Possible update  >  (Un) Subscribe thread alerts  
Subject:Possible update
Summary:Use elem.apply(callback)
Messages:3
Author:martin barker
Date:2017-02-28 12:43:34
 

  1. Possible update   Reply   Report abuse  
Picture of martin barker martin barker - 2017-02-28 12:43:34
It would be better if this was more like the jQuery syntax system they use. so where you calling callback and passing the element as the first parameter it would be better if you used elem.apply(callback) this why users are still able to use the $(this) to access the element and not have to use a defined variable in the callback method.

  2. Re: Possible update   Reply   Report abuse  
Picture of martin barker martin barker - 2017-02-28 12:49:04 - In reply to message 1 from martin barker
On this note i have sent you a pull request on git hub showing what i mean your welcome to merge it it but remember to rebuild your min version :)

  3. Re: Possible update   Reply   Report abuse  
Picture of Emil Kilhage Emil Kilhage - 2017-05-03 09:50:18 - In reply to message 1 from martin barker
I'm not to sure about this. In the current version you can use $(this) to access the element or $(element) trough the parameter. Have you tried the code in your pull request? Calling apply on the element doesn't feels like it work?