View Full Version : Fade out javascript

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

<script src="jquery-latest.js"></script>


$("p").click(function () {

p { font-size:150%; cursor:pointer; }
If you click on this paragraph
you'll see it just fade away. </p>
<table width="200" border="0">
<td>click here to fade out the whole row</td>

the java script is here (http://code.jquery.com/jquery-latest.js)

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

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") %>";


$("td").click(function () {

<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>
<td > <span class="style7">
<% out.println(day);%>
<% out.println("-");%>
<% out.println(m);%>
<% out.println("-");%>
<% out.println(year);%>
<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>