Advertisement
Guest User

Untitled

a guest
Sep 4th, 2015
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.99 KB | None | 0 0
  1. (function($) {
  2. $(document).ready(function() {
  3. $(document).on("click", '.portletNavigationTree a', function(event) {
  4. event.preventDefault();
  5. link = $(this).attr('href');
  6. tipo = $(this).attr('class').split(' ');
  7. tipo = tipo[tipo.length-1]
  8. levelClass = $(this).parent().parent().attr('class').split(' ');
  9. level = levelClass[levelClass.length-1]
  10. $.ajax({
  11. type: 'GET',
  12. url: link,
  13. dataType: 'html',
  14.  
  15. beforeSend: function( xhr ) {
  16. xhr.overrideMimeType( "text/plain; charset=utf8" );
  17. }
  18. })
  19. .done(function( data ) {
  20. $('#portal-columns').html($(data).find('#portal-columns'));
  21. if($('.navTreeLevel2')[0]) {
  22. $('body').removeClass('secao-duas-colunas').addClass('secao-tres-colunas');
  23. } else {
  24. $('body').removeClass('secao-tres-colunas').addClass('secao-duas-colunas');
  25. }
  26. });
  27.  
  28. })
  29.  
  30. })
  31. })(jQuery);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement