Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New Coder
    Join Date
    Dec 2007
    Posts
    82
    Thanks
    10
    Thanked 0 Times in 0 Posts

    Fade out javascript

    how do i make that when i click "click here" the whole row will fade out?
    Code:
    <html>
    <head>
    <script src="jquery-latest.js"></script>
      
      <script>
      $(document).ready(function(){
        
        $("p").click(function () {
          $("p").fadeOut("slow");
        });
    
      });
      </script>
    <style>
      p { font-size:150%; cursor:pointer; }
      </style>
    </head>
    <body>
      <p>
        If you click on this paragraph
        you'll see it just fade away.  </p>
      <table width="200" border="0">
        <tr>
          <td>asd</td>
          <td>asd/td>
          <td>click here to fade out the whole row</td>
        </tr>
      </table>
    </body>
    </html>



    the java script is here

  • #2
    Senior Coder Spudhead's Avatar
    Join Date
    Jun 2002
    Location
    London, UK
    Posts
    1,856
    Thanks
    8
    Thanked 110 Times in 109 Posts
    Code:
    $("td").click(function () {
         $(this).parent().fadeOut("slow");
    });

  • #3
    New Coder
    Join Date
    Dec 2007
    Posts
    82
    Thanks
    10
    Thanked 0 Times in 0 Posts
    i have a problem... what i want is that when i click the moveicon.gif the whole row fades however i have another javascript for a dialog box to confirm the delete...

    i am having a hard time how to implement it after selecting "ok" in the confirm box...

    Code:
    <script src="images/jquery-latest.js"></script>
    
    <script type="text/javascript">
    <!--
    function confirmation1() {
    	var answer = confirm("Do you want to move this to archives?")
    	if (answer){
    		
    		window.location = "http://localhost:8080/ICTPROJ/deployment/archiver.jsp?r=<%=crset3.getString("ref_num")%>&t=<%=crset3.getString("dep_time")%>&l=<%= crset3.getString("dep_location") %>&d=<%= crset3.getString("dep_date") %>";
    	}
    	else{
    		
    	}
    }
    //-->
    </script>
    <script>
      $(document).ready(function(){
        
        $("td").click(function () {
          $("td").fadeOut("slow");
        });
    
      });
    </script>
          <td  scope="row"><div align="left" class="style22"><span class="style7"> <%= crset3.getString("dep_type") %> </span>&nbsp;</div></td>
       	  <td  scope="row"><div align="left" class="style22"><span class="style7"> <%= crset3.getString("dep_name")%></a>
    </span>&nbsp;</div></td>
           <td > <span class="style7">
           <% out.println(day);%>
           <% out.println("-");%>
           <% out.println(m);%>
           <% out.println("-");%>
           <% out.println(year);%> 
           </span></td>
           <td ><div align="center"><a href="http://localhost:8080/ICTPROJ/deployment/reports_2.jsp?t=<%=crset3.getString("dep_time")%>&l=<%= crset3.getString("dep_location") %>&d=<%= crset3.getString("dep_date") %>" onClick="chw=window.open('http://localhost:8080/ICTPROJ/deployment/reports_2.jsp?t=<%=crset3.getString("dep_time")%>&l=<%= crset3.getString("dep_location") %>&d=<%= crset3.getString("dep_date") %>','NewWindow','resizable=yes,scrollbars=yes,status=yes,width=640,height=500'); if (chw != null) chw.focus(); return false"><img src="../Chapters/images/reporticon.gif" border="0"></a></div></td>
           <td ><div align="center"><img src="images/moveicon.gif" width="29" height="29" border="0" onClick="confirmation1()"></div></td>


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •