Go Back   CodingForums.com > :: Client side development > JavaScript programming > JavaScript frameworks

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 10-25-2009, 12:25 PM   PM User | #1
sher_amf
New Coder

 
Join Date: Dec 2007
Posts: 82
Thanks: 10
Thanked 0 Times in 0 Posts
sher_amf is an unknown quantity at this point
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
sher_amf is offline   Reply With Quote
Old 10-27-2009, 05:56 PM   PM User | #2
Spudhead
Senior Coder

 
Spudhead's Avatar
 
Join Date: Jun 2002
Location: London, UK
Posts: 1,856
Thanks: 8
Thanked 110 Times in 109 Posts
Spudhead is on a distinguished road
Code:
$("td").click(function () {
     $(this).parent().fadeOut("slow");
});
Spudhead is offline   Reply With Quote
Old 10-28-2009, 06:41 AM   PM User | #3
sher_amf
New Coder

 
Join Date: Dec 2007
Posts: 82
Thanks: 10
Thanked 0 Times in 0 Posts
sher_amf is an unknown quantity at this point
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>
sher_amf is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 10:46 PM.


Advertisement
Log in to turn off these ads.