jQuery( document ).ready(function() {
var destruccion = jQuery("li.user").remove();
var creacion = jQuery("div.header-tools ul li:nth-child(1)").before('<li class="user tools-icon"><a href="#" class="new-sistem-link"><span class="ui-icon-profile"></span></a></li>');
if(destruccion){
//console.log( "destruido" );
creacion;
}
if(creacion){
jQuery( "a.new-sistem-link" ).click(function( event ) {
event.preventDefault();
console.log( "Hola mundo" );
});
}
});
jQuery destroys an element and appends other in the frist position
Be the first to comment
You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.