Answer the question
In order to leave comments, you need to log in
Ajax load how to correctly load with a variable instead of a url?
There is an element that needs to be loaded with Ajax, the
link can change and it is set to a variable
, usually this is done like this $('.element').load('ajax.html #container');
but when the reference is in a variable, how to write it correctly?
something like this comes to mind
var link = 'ajax.html'
$('.element').load('#container', link)
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question