-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.

is it possible?

please give me some reference on how to do it.

2
  • 5
    yes it is possible.share some code first. Feb 12, 2014 at 8:04
  • 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. Feb 12, 2014 at 8:09

2 Answers 2

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
0
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 :)

1
  • thank you for your answer. i really appreciated it Saeedses.. =) Feb 12, 2014 at 8:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.