jquery - Load content into DIV dependent on link id -
basically, have created multiple links class 'link' , each have id of represent.
i have written jquery script, isn't working me, , throws first error:
$(function() { $.get('pages/home.html') .success(function(response) { $('.contentblock').html(response); }) .error(function(jqxhr, textstatus, errorthrown) { $('.contentblock').html('<h1>failed load page(s)!</h1>'); }); $(document).on('click', '.link', function() { $('.contentblock').html('<div class="animatedload"></div>'); var page = 'pages/' + $(this).attr('id') + '.html'; $('.contentblock').hide(); $.get(page) .success(function(response) { $('.contentblock').html(response); }) .error(function(jqxhr, textstatus, errorthrown) { }); $('.contentblock').fadein(1000); }); }); its throwing .error(function()){} in 6th line.
please me solve :( thank in advance!
edit: server issue, not code :)
~mcd
turns out @crimson_penguin right!
it wont work security reasons, put onto server work
Comments
Post a Comment