Welcome to Egypt Forums Mark forums read | Egypt Main Page
Egypt Forums
Arabic Movies



Articles Thread, Hide certain things from users that have javascript disabled in vBulletin; <div> Hide certain things from users that have javascript disabled I needed this for a project I'm working on, and ...

Short Link: http://forum.egypt.com/enforum/showthread.php?t=3357


Reply
LinkBack (4) Thread Tools Display Modes
Hide certain things from users that have javascript disabled
 
 
The God Father
Developer's Avatar

Reply With Quote
 
Join Date: Jul 2008
Location: NDC
Posts: 5,425
10-09-2008, 06:44 PM
 
<div> Hide certain things from users that have javascript disabled

I needed this for a project I'm working on, and thought I'd share it, as I liked my idea a lot. Egypt.Com EnForum

Instructions
Open your headinclude template and add this code at the very bottom:
<div style="margin: 5px 10px;"> <div class="smallfont" style="margin-bottom: 2px;">HTML Code:
PHP Code:
     <!-- is js enabled? -->
<
noscript>
    <
style type="text/css">
        .
ifjs { display:none; }
    </
style>
</
noscript>
<!-- /
is js enabled? -->
Then you can add the class ifjs to any element you want to be hidden from visitors that have disabled javascript. For example:
<div style="margin: 5px 10px;"> HTML Code:
PHP Code:
     <div class="ifjs">visitors with disabled js won't see this</div>

<div class="alt1 ifjs">visitors with disabled js won'
t see this</div>
You can even use it in non-vbulletin pages (as long as you put that code in the head) as it doesn't use any vB-specific code. Egypt.Com EnForum
Feel free to go crazy with javascript now and not worry about those morons who disable it!
__________________
I Love Walking In The Rain Cuz Nobody Know I'm Crying !!
 
 
 
Reply

Articles Thread, Hide certain things from users that have javascript disabled in vBulletin; <div> Hide certain things from users that have javascript disabled I needed this for a project I'm working on, and ...

Short Link: http://forum.egypt.com/enforum/showthread.php?t=3357


Bookmarks

Tags
disabled, hide, javascript, things, users


LinkBacks (?)
LinkBack to this Thread: http://forum.egypt.com/enforum/articles-f145/hide-certain-things-users-have-javascript-disabled-3357.html
Posted By For Type Date
Magnify User (Ginnys Incrediforum) This thread Refback 30-06-2009 06:41 PM
Magnify User (Ginnys Incrediforum) This thread Refback 30-06-2009 07:02 AM
Cbox This thread Refback 17-02-2009 07:52 AM
Cbox This thread Refback 16-02-2009 11:12 PM

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Using PHP include() – Make things easy for yourself! Developer Classes & Source Code 0 04-12-2008 04:13 AM
JavaScript XMLHttpRequest Object Tutorial Developer Javascript / VB Script 0 02-12-2008 12:52 AM
Adding Javascript to your Template Developer Articles 0 27-10-2008 09:44 PM
The Worst Things You Can Ever Do(tm) Developer Articles 0 07-10-2008 02:32 PM
50 most important things the_crazy_zende User Events 4 19-09-2007 01:06 PM