i have ajax request
$.ajax({ url: url datatype: 'html', success: function(result) { #i received 2 different partials , want differentiate them. # planning differentiate them div ids of conatiners embedding partials. #if use if( $(result).find("#divid1").id =="divid1") { # partial. } else { # second partial. } }, }); if result contains second partial. code stopping @ if loop. there way check if result conatins particular div id , if not other thing in else block ??
edit ::
sry, if question not clear. ajax returns me html. not total html file part of html file(partial). partial bootstrap container content inside it. purpose hear want add partial existing html on view. have possibility of 2 partials returned in result ajax, , want differentiate them.
Comments
Post a Comment