Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var loadContent = function(){
- $.ajax({
- url: '/url',
- method: 'GET'
- }).success(function (html) {
- $('.content-wrapper').replaceWith(html);
- })
- //this is how simple returned html looks like
- //<div class="content-wrapper"><ul"><li>test</li></ul></div>
- };
- var testAjaxGeneratedHtml = function() {
- loadContent();
- $('.content-wrapper ul li').addClass('test');
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement