I
I
im_age2014-04-17 12:34:32
JavaScript
im_age, 2014-04-17 12:34:32

Why don't styles work after AJAX loading content?

Hello! A piece of html code is loaded on the page via an ajax request , but all the styles of this piece do not work.

I guess, of course, that because this html code was not there when the page was loaded - that's why the styles are not applied to it, but I don't know how to fix it.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
I
im_age, 2014-04-17
@im_age

I'm sorry, it's not styles that don't work, only images.
That's it, I figured it out, the problem was only in {{ STATIC_URL }}, you need to use {% load staticfiles %} and accordingly {% load "link" %}.

V
v_prom, 2014-04-17
@v_prom

after loading, hook styles to them via jquery

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question