You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Inside the school_page.html I have container with class .novices, where the template with data is placed to.
This works fine, hovewer I cannot get list of .card, because all tries to log it invokes before context is executed. console.log($('.card')) gives Object { length: 0, prevObject: {…} } either I use second .then or this.after(). When i check $('.card') in the console, after all being rendered I have list of elements as I want to. The deal, I want bind event (click) to all of .cardelements, as soon as they have inserted. Please, advise (^-')
The text was updated successfully, but these errors were encountered:
axdrv
changed the title
When user at the first time visit website with page another than base index.html
Selector still unreachable after adding those into the DOM
Oct 31, 2020
Hello. Sorry this is not an issue, but question how this organized in sammy.js.
This is a template:
this code in
main.js
fileInside the
school_page.html
I have container with class.novices
, where the template with data is placed to.This works fine, hovewer I cannot get list of
.card
, because all tries to log it invokes before context is executed.console.log($('.card'))
givesObject { length: 0, prevObject: {…} }
either I use second.then
orthis.after()
. When i check$('.card')
in the console, after all being rendered I have list of elements as I want to. The deal, I want bind event (click) to all of.card
elements, as soon as they have inserted. Please, advise (^-')The text was updated successfully, but these errors were encountered: