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

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 12-06-2010, 09:47 PM   PM User | #1
nmaea7
New to the CF scene

 
Join Date: Dec 2010
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
nmaea7 is an unknown quantity at this point
disable DIV on load

Hello,

I have been looking for a good walk-through online, but can't seem to find an exact resolution to what I am trying to do.

Can someone please supply some example code for not displaying everything that is inside a <div>. Basically I do not want social media content to be displayed on secure pages, but want them on every other page. This is what I have:
Code:
<div id="share">
	<ul>
		<li>
			<div class="addthis_toolbox addthis_default_style ">
				<a href="http://www.addthis.com/bookmark.php?v=250&amp;username=###### class="addthis_button_compact">Share</a>
					<span class="addthis_separator">|</span>
				<a class="addthis_button_preferred_1"></a>
				<a class="addthis_button_preferred_2"></a>
				<a class="addthis_button_preferred_3"></a>
				<a class="addthis_button_preferred_4"></a>
			</div>
		</li>	
		<script>
			var addthis_config = {"data_track_clickback":true};
			if (document.location.protocol !== 'https:') {
				$jq.getScript('http://s7.addthis.com/js/250/addthis_widget.js?username=######', function() { });
			}
		</script>
	</ul>
</div>
nmaea7 is offline   Reply With Quote
Old 12-06-2010, 09:56 PM   PM User | #2
Philip M
Supreme Master coder!

 
Philip M's Avatar
 
Join Date: Jun 2002
Location: London, England
Posts: 17,033
Thanks: 197
Thanked 2,410 Times in 2,388 Posts
Philip M has a spectacular aura aboutPhilip M has a spectacular aura aboutPhilip M has a spectacular aura about
<div id = "mydiv" style="display:none">Content of the div</div>

and then to show the div in script

document.getElementById("mydiv").style.display="block";


All advice is supplied packaged by intellectual weight, and not by volume. Contents may settle slightly in transit.
Philip M 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 07:58 PM.


Advertisement
Log in to turn off these ads.