• Moshe Karmel 9
  • 5 Points
  • Member since 2014

  • Chatter
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
  • 3
How no include JQuery in a lighgtning app
<aura:clientLibrary url="http://jquery.org/latest/jquery.js" type="JS" />
gives error when I try to save it.
i have a Problem. My Button dont fired.
When I turn on the console.log(amt) after amtField.get("Value") nothing happens. Why?
The calendar will not open. Why?

Hi big audience!
I've developer several components since the release of Lightning framework but I still have a strange problem.
When I load external libraries (most common case is Bootstrap and jQuery) sometimes the jQuery library is not correctly loaded on startup, thus causing problems on dynamically loaded UI.
The docs say I should use the "renderer" with the afterRender event, but doing this I don't see any trace of jQuery (like it is not yet loaded, the $ plugin is undefined), so I can't init my UI from that method.
This leads to random crash of the app on first load, because sometimes the jQUery library is not loaded on startup.
Do you have any suggestions on this?
I'm currently using "setTimeout" to run the UI initializazione asynchronously, but I don't think this is a clean and good solution.