SMF For Free Support Forum
Signup For Free Forum
July 04, 2009, 11:26:18 pm *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Welcome to SMF For Free. The best free SMF Host
 
   Home   Help Search Arcade Gallery Login Register  

Pages: [1]
  Print  
Author Topic: [Code]Hide the Write Comment part in the news in the portal, display it on hover  (Read 641 times)
0 Members and 1 Guest are viewing this topic.
Celebrus
SMF For Free Hero
*
Offline Offline

Posts: 940


λ is awesome


View Profile WWW
« on: January 01, 2008, 04:55:26 am »

Since this code uses jQuery,
ensure that this is present in your headers:
Code:
<script src="jquery.js"></script>

Footers:
Code:
<script>
// Made by Omikron 9861
$("div#bodyarea table tbody tr td table tbody tr td.windowbg table.ssi_table tbody tr td a:contains('Write Comment')").parent().hide();$("table.ssi_table").hover(function(){$("table.ssi_table tbody tr td:contains('Write Comment')").toggle();},function(){$("table.ssi_table tbody tr td:contains('Write Comment')").toggle();});</script>

This code hides the 'X Comments | Write Comments' part on the portal and then displays it when you hover your mouse over a news item. The code above is the compressed one to save bandwidth. If you want the original for educational purposes, here it is:

Code:
<script>
//Made by Omikron 9861
//Leave this copyright intact
$("div#bodyarea table tbody tr td table tbody tr td.windowbg table.ssi_table tbody tr td a:contains('Write Comment')").parent().hide();
$("table.ssi_table").hover(
function(){
$("table.ssi_table tbody tr td:contains('Write Comment')").toggle();
}, function(){
$("table.ssi_table tbody tr td:contains('Write Comment')").toggle();
});
</script>
Logged

Project_unknown
SMF For Free Newbie
*
Offline Offline

Posts: 8


View Profile
« Reply #1 on: January 22, 2008, 01:57:59 pm »

Can you make it so that it removes it all together? =\
Logged
Celebrus
SMF For Free Hero
*
Offline Offline

Posts: 940


λ is awesome


View Profile WWW
« Reply #2 on: January 23, 2008, 02:37:26 am »

Try this:

Code:
<script>
//Created by Omikron 9861
$("div#bodyarea table tbody tr td table tbody tr td.windowbg table.ssi_table tbody tr td a:contains('Write Comment')").parent().hide();
</script>
Logged

Project_unknown
SMF For Free Newbie
*
Offline Offline

Posts: 8


View Profile
« Reply #3 on: January 23, 2008, 11:37:20 am »

Worked, thanks very much
Logged


Pages: [1]
  Print  
 
Jump to:  

cheap low cost web hosting reviews

Powered by SMF 1.1.9 | SMF © 2006-2009, Simple Machines LLC
ServerBeach Coupon
Page created in 0.55 seconds with 16 queries.