You can test it on the following demo blog - click the link that says "Turn off the lights" and the page will be darkened. To make the page elements active again, just click the "Turn on the lights" link:
How to add the "Turn off the Lights" Feature to Blogger/Blogspot
Step 1. Log in to your Blogger account and click on your blog > go to "Template" and hit the "Edit HTML" buttonStep 2. Click anywhere inside the code area and search for the following tag by pressing the CTRL + F keys (hit Enter to find it)
</head>
Step 3. After you found it, paste the below scripts just above it:
<script src='http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js' type='text/javascript'/>Note: if you already have one version of jquery in the template, please remove the line in red.
<script type='text/javascript'>
//<![CDATA[
$(document).ready(function(){
$("#lightsoff").css("height", $(document).height()).hide();
$(".lightSwitcher").click(function(){
$("#lightsoff").toggle();
if ($("#lightsoff").is(":hidden"))
$(this).html("Turn off the lights").removeClass("turnedOff");
else
$(this).html("Turn on the lights").addClass("turnedOff");
});
});
//]]>
</script>
Step 4. Now search for the following tag:
]]></b:skin>Step 5. Just above ]]></b:skin> add the following CSS:
/* Turn off the lightsStep 6. Try to find this tag:
----------------------------------------------- */
#lightsVideo {
position:relative;
z-index:102;
}
#switch {
max-width:640px;
text-align:left;
position:relative;
height:25px;
display:block;
margin: 25px 0 0 60px;
}
.lightSwitcher {
position:absolute;
z-index:101;
background-image:url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh9bQIlcLgHaSiIkxEwOFACm3RxWjJeZtNfAfu5hyyqjTQQ8BfbTlVSG7mj5bPmZ0qKHipZdXQ2u5n8AbWGYXLbx5fff2_btWHeUaNJeGbUpza5BmiOo_oR31CI1YXEntySxrpVPZ3TmgxS/s1600/lights-on.png);
background-repeat:no-repeat;
background-position:left;
padding: 0 0 0 20px;
outline:none;
text-decoration:none;
}
.lightSwitcher:hover {text-decoration:underline;}
.turnedOff {
color:#ffff00 !important;
background-image:url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi-sdCibAmL5Ys20H9Pxheitfs5EsDNU1mttN9neSwqg3yAZGverfKYt89vfBijT-E3nrPloc6X231GCiPi-u31xZtNA5ZZNo5zAlUkxVIp_ZLGFjJI_QJHZCdSgb6-CtfJwV7JxipcToxN/s1600/lights-off.png);
}
#lightsoff {
background:#000;
opacity:0.9;
filter:alpha(opacity=90);
position:absolute;
left:0;
top:0;
width:100%;
z-index:100;
}
</body>Just above the </body> tag, add this HTML code:
<div id='lightsoff'/>Step 7. Click the "Save Template" button and that's it!
Now, wherever you put your video, either a post or a HTML/Javascript gadget, use this code:
<center>Add the code of your video instead of the blue text and "Save" or "Publish" your gadget / post. Now you can enjoy your videos with the lights off!
<div id="switch"><a class="lightSwitcher" href="javascript:void(0);">Turn off the lights</a></div>
<div id="lightsVideo">
...Here goes the code of the video...
</div>
</center>
Remember that this trick uses jQuery and if you use another version of jQuery, you must check to have only one, otherwise it might now work.
Cord Blood Hosting eCommerce sites Donate Car to Charity California Claim Conference Call Fashion and Design CRIMINAL DEFENSE ATTORNEY PALM BEACH How to donate a car in California mesothelioma suit · Better Conferencing Calls · Car Accident Lawyers Insurance Loans domain registration yahoo Recovery Mortgage Fatcow Credit Software Transfer Donate Car for Tax Credit Forex Trading Attormey Cooking Recipes Trading NUNAVUT CULTURE Donate All topics related to traffic from USA Classes Lawyer Donate car for tax credit STRUCTURED ANNUITY SETTLEMENT Attomey Digital Photography Technology hair removal washington dc Rehab Treatment structured settlement annuity companies · PaperPort Promotional Code Coupons Student Loans Technology Blogs domains yahoo Data Recovery Services small business administration sba Degree Gas/Electricity DAYTON FREIGHT LINES Mesothelioma Law Firm Bluehost AUTO ACCIDENT LAWYER DENVER ANNUITY SETTLEMENT benchmark lending MOTORCYCLE ACCIDENT ATTORNEY LOS ANGLES mesothelioma survival rates structured settlements annuities mesothelioma attorneys california structured settlement buyer mesothelioma claim Health Business



 
No hay comentarios:
Publicar un comentario