...

View Full Version : Fade out javascript



sher_amf
10-25-2009, 01:25 PM
how do i make that when i click "click here" the whole row will fade out?


<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 (http://code.jquery.com/jquery-latest.js)

Spudhead
10-27-2009, 06:56 PM
$("td").click(function () {
$(this).parent() (http://docs.jquery.com/Traversing/parent).fadeOut("slow");
});

sher_amf
10-28-2009, 07:41 AM
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...


<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>



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum