S
S
seredaes2015-10-12 00:53:03
JavaScript
seredaes, 2015-10-12 00:53:03

How to select a dynamically created element?

There is an element. You need to get its size.
$(".class_name").width() doesn't work

.on is used for event handling, not to catch the event, but just to get the size...

Answer the question

In order to leave comments, you need to log in

2 answer(s)
L
littleguga, 2015-10-12
@littleguga

Everything should work .
See errors in the browser console - F12.

I
Ivan Volkov, 2015-10-12
@oOLokiOo

yes, console.log($(".class_name").width()) and see the
F12 console - chrome, as mentioned above

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question