Visualizzazione dei risultati da 1 a 2 su 2
  1. #1
    Utente di HTML.it
    Registrato dal
    Dec 2011
    Messaggi
    229

    show children con in mezzo <a>

    Ciao a tutti.

    Ho questo codice:
    codice:
    <div class="<%=classes%>" >
        <a href="scheda.asp?ida=<%=RSX("ID")%>&idc=<%=RSX("X_ID_COL")%>" style="text-decoration:none">
            <div class="png_costo">
                <div class="content_png_costo">
                    <span><%=ucase(RSX("COLORE"))%></span>
    
                    <%=ucase(RSX("NOME_ARTICOLO_1"))%>  
                    <div class="bordato"></div>
                    <div class="fs21">&euro; <%=Formatprice(RSX("PREZZO_VEND"))%></div>
                </div>  		
            </div>
            [img]<%=path_generale%>public/prodotti/<%=RSX([/img]-<%=RSX("X_ID_COL")%>-F-4.jpg" width="310px;" border="0" alt="" />
        </a>
    
    </div>
    Con questo Java:
    codice:
    $(function() {  
    	$(".div_art_scat").hover(function () {
    		var $display = $(this).children(".png_costo").css('display');
    		if ($display=="none"){$(this).children(".png_costo").fadeIn('fast');}	//fixed						   
    	},
    	function () {  
    		$(this).children(".png_costo").fadeOut('fast');
    	});   
    });

    sull over dovrebe fare il fade in di png_costo ma se c e di mezzo il tag <a> non fa il fade, presuppongo per il fatto che il div non è il primo figlio di div_art_scat come descritto in java.
    E' così? Come ovviare?

    Grazie

  2. #2
    Utente di HTML.it
    Registrato dal
    Dec 2011
    Messaggi
    229
    RISOLTO CON:
    codice:
    <div class="<%=classes%>" >
        <a href="scheda.asp?ida=<%=RSX("ID")%>&idc=<%=RSX("X_ID_COL")%>" style="text-decoration:none">
            <div class="prova_png">
                <div class="png_costo">
                    <div class="content_png_costo">
                        <span><%=ucase(RSX("COLORE"))%></span>
    
                        <%=ucase(RSX("NOME_ARTICOLO_1"))%>  
                        <div class="bordato"></div>
                        <div class="fs21">&euro; <%=Formatprice(RSX("PREZZO_VEND"))%></div>
                    </div>  		
                </div>
                [img]<%=path_generale%>public/prodotti/<%=RSX([/img]-<%=RSX("X_ID_COL")%>-F-4.jpg" width="310px;" border="0" alt="" />
            </div>
        </a>
    </div>
    relativo Java:
    codice:
    $(function() {  
    	$(".prova_png").hover(function () {
    		var $display = $(this).children(".png_costo").css('display');
    		if ($display=="none"){$(this).children(".png_costo").fadeIn('fast');}	//fixed						   
    	},
    	function () {  
    		$(this).children(".png_costo").fadeOut('fast');
    	});   
    });

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved.