Ver Mensaje Individual
  #2 (permalink)  
Antiguo 08/03/2017, 08:52
jeremiselxi
(Desactivado)
 
Fecha de Ingreso: septiembre-2008
Mensajes: 269
Antigüedad: 15 años, 7 meses
Puntos: 22
Respuesta: Breadcumbs me repite

Inténtalo de esta forma.

Código Javascript:
Ver original
  1. $( document ).ready(function() {
  2. /*  Cargamos el getscript una vez*/
  3. $.getScript("assets/js/main.js");
  4.  
  5. /*Luego todo el codigo menos el getscript */
  6.  
  7. $("#cargamenu .ltab").click(function(){
  8.         var id = $(this).attr("href");
  9.         var $this = $(this),
  10.        
  11.         $bc = $('<div class="item"></div>');
  12.  
  13.         $this.parents('li').each(function(n, li) {
  14.             var $a = $(li).children('a').clone();
  15.             $bc.prepend($a, ' => ');
  16.         });
  17.                
  18.         $.post("class/Menu.php",{"id":id},function(htmlexterno){
  19.             $("#cargaexterna").html(htmlexterno);
  20.          /*   $.getScript("assets/js/main.js"); */
  21.         });
  22.        
  23.         $('.breadcrumb').html( $bc.prepend('') );
  24.                    
  25.         return false;
  26.     });
  27.    
  28.     $("#cargaexterna .ltab").click(function(){
  29.         var id = $(this).attr("href");
  30.         var $this = $(this),
  31.        
  32.         $bc = $('<a></a>');
  33.  
  34.         $this.parents('li').each(function(n, li) {
  35.             var $a = $(li).children('a').clone();
  36.             $bc.prepend($a, ' => ');
  37.         });
  38.        
  39.         $('.item').append( $bc.prepend('') );
  40.                
  41.         $.post("class/Menu.php",{"id":id},function(htmlexterno){
  42.             $("#cargaexterna2").html(htmlexterno);
  43.         });                    
  44.         return false;
  45.     });
  46. });