HTML + Javascript: ¿Cómo puedo cargar datos en Div a través de Class?
Frecuentes
Visto 215 equipos
-2
I just want to ask if it is possible to separate my View (HTML & CSS files) in such a controller like JavascriptCode/AJAX, and when the time the page was loaded only the controller will bind the data to that specific element like DIV via its class.
¿es posible?
please give me some reference on how to do it.
2 Respuestas
0
You cand add data to a Div using:
$('.ClassName').html(data); // will override all content
or
$('.ClassName').append(data); // will append content to the actual content of the DIV
Respondido 12 Feb 14, 08:02
0
You can bind your data to a DIV using jQuery like this:
$('.yourClassName').html(yourData);
if you share your code, it would be helpful in providing exact answer :)
Respondido 12 Feb 14, 08:02
thank you for your answer. i really appreciated it Saeedses.. =) - user3274033
No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas javascript jquery html css or haz tu propia pregunta.
yes it is possible.share some code first. - Milind Anantwar
sorry but i don't have any code. I just came to an idea that if one person created the layout(html & css) and the one created the backend at both the same time, it will lessen the development period of the project. and only the class or id of an element will be the "glue" to combine those. please help me Milind Anantwar. - user3274033