We hope you enjoy your visit.

You're currently viewing our forum as a guest. This means you are limited to certain areas of the board and there are some features you can't use. If you join our community, you'll be able to access member-only sections, and use many member-only features such as customizing your profile, sending personal messages, and voting in polls. Registration is simple, fast, and completely free.


Join our community!


If you're already a member please log in to your account to access all of our features:

Username:   Password:
Locked Topic
[ C ] Remove the 'Hits:'
Topic Started: Aug 14 2012, 06:14 PM (392 Views)
Ferby
Member Avatar
Developer
[ *  *  *  *  * ]
Board Address: Not released yet
Board Software: Zetaboards
Description: Okay well I've been trying to remove the blue box. I'm new to Javascript so I thought I could write a simple code for it. It worked but it removed the red box. I tried it when CSS and then I realised that they both use the same Class. So I'm confused, how could I remove the td for a redirect forum but not for normal?

Posted Image
Attached to this post:
Attachments: 82647a9.png (12.44 KB)
Edited by Ferby, Aug 14 2012, 06:14 PM.
Offline Profile Goto Top
 
Viral
Member Avatar
Viral
[ *  *  *  *  *  * ]
Ferby
Aug 14 2012, 06:14 PM
Board Address: Not released yet
Board Software: Zetaboards
Description: Okay well I've been trying to remove the blue box. I'm new to Javascript so I thought I could write a simple code for it. It worked but it removed the red box. I tried it when CSS and then I realised that they both use the same Class. So I'm confused, how could I remove the td for a redirect forum but not for normal?

Posted Image
Is that the class `.c_last`? If so, the following code should work:

Code:
 
<script type="text/javascript">
//<![CDATA[
$("td.c_last:contains(Hits: 0) ").each(function(){
var h_span = $(this).attr("colspan") === undefined ? 1 : $(this).attr("colspan");
var c_span = $(this).prev().attr("colspan") === undefined ? h_span + 1 : $(this).prev().attr("colspan") + h_span;
$(this).prev().attr("colspan",c_span).end().remove();
});
//]]>
</script>


I don't know off by heart the colspans of each of the tds and whether they change, so the above code works everything out dynamically. Should work :) .
Offline Profile Goto Top
 
Cory
Member Avatar
Member
[ *  *  *  *  *  *  *  *  * ]
It seemed to work properly.

I would make 'Hits: 0' only 'Hits:' though, because the forum might have hits.
Offline Profile Goto Top
 
Ferby
Member Avatar
Developer
[ *  *  *  *  * ]
Cory
Aug 14 2012, 07:15 PM
It seemed to work properly.

I would make 'Hits: 0' only 'Hits:' though, because the forum might have hits.
I'll edit that out

Thanks Viral
Offline Profile Goto Top
 
Viral
Member Avatar
Viral
[ *  *  *  *  *  * ]
No problem, was under the impression you only wanted to hide those without hits :P .
Offline Profile Goto Top
 
Steve
Member Avatar
patriot
[ *  *  *  *  *  *  *  *  *  * ]
Completed!

Your request has been completed. If you have any questions or concerns regarding the state of your request, please feel free to contact me via PM.
Offline Profile Goto Top
 
1 user reading this topic (1 Guest and 0 Anonymous)
« Previous Topic · Closed Requests · Next Topic »
Locked Topic