Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <script type="text/javascript">
- //EDITAR NOMRE DE LAS MARCAS
- $('.dropDownBox li a').live('mouseover', function(){
- $(this).addClass('over');
- });
- $('.dropDownBox li a').live('mouseout', function(){
- $(this).removeClass('over');
- });
- $('.iconEditarEstrella').click(function(event){
- event.preventDefault();
- event.stopPropagation();
- var nombreEstrella = $(this).parents('.estrellas').find('.nombreEstrella').html();
- $(this).parents('.estrellas').find('.nombreEstrella').html('<input type="text" class="inputEdit" name="'+nombreEstrella+'" id="'+nombreEstrella+'" value="'+nombreEstrella+'" />');
- $(this).parents('.estrellas').find('.inputEdit').focus();
- $('.dropdownEstrellas').addClass('editando');
- $(this).removeClass('iconEditarEstrella');
- $(this).removeClass('icon16');
- $(this).addClass('editandoEste');
- $('.editando input').click(function(event){
- event.preventDefault();
- event.stopPropagation();
- $(this).focus();
- $(this).select();
- });
- $('.inputEdit').keypress(function(event){
- if (event.which == '13') {
- if($('.inputEdit').val() == null || $('.inputEdit').val() == ""){
- $(this).parents('.estrellas').find('.nombreEstrella').html(nombreEstrella);
- }else{
- $(this).parents('.estrellas').find('.nombreEstrella').html($('.inputEdit').val());
- //GUARDAR NOMBRE DE ESTRELLA
- }
- $('.editandoEste').addClass('icon16');
- $('.editandoEste').addClass('iconEditarEstrella');
- }
- });
- $('.inputEdit').blur(function(){
- if($('.inputEdit').val() == null || $('.inputEdit').val() == ""){
- $(this).parents('.estrellas').find('.nombreEstrella').html(nombreEstrella);
- }else{
- $(this).parents('.estrellas').find('.nombreEstrella').html($('.inputEdit').val());
- //GUARDAR NOMBRE DE ESTRELLA
- }
- $('.editandoEste').addClass('icon16');
- $('.editandoEste').addClass('iconEditarEstrella');
- });
- });
- </script>
Add Comment
Please, Sign In to add comment