How it works?
You must check for sure that you have intro jQuerry first. So, search for this tag
- Go To Blogger > Pages
- Create a Static Page with title Demo or any name you prefer
- Switch to its HTML view mode
- Replace the code inside it if any with the following code:
<div height="100%" id="iframe-container" width="100%"> <style> body { padding: 0!important; background: none!important; } #iframe-container { overflow: hidden; background: none!important; } #frame { border: 0; } </style> <iframe frameborder="0" id="frame" src="" width="100%"> </iframe> </div> <script> document.documentElement.style.overflow = 'hidden'; // firefox, chrome document.body.scroll = "no"; // ie only var query = window.location.search.substring(1); query = query.replace("url=", ""); $('#frame').attr('src', query); var str = $('#iframe-container').html(); $('#MBT-REDIRECTION').html(str); $('iframe').height($(window).height()); </script>
- Now setup up your blogger post editor settings. Click options and then under Line Breaks, choose "Use <br> tag" Hit Done.
- Save your page
- Now create another page with the title "Download". Repeat the exact same steps from Step#3 - Step#6
2. String Concatenation
- Go To Blogger > Template
- Backup your template
- Click Edit HTML
- Search for <body> or a similar by searching just <body
- Paste the following code just below it:
<div id='MBT-REDIRECTION'>
- Next find </body>
- Paste the following code just above it:
</div><!--MBT-REDIRECTION ENDS-->
- Now search for ]]></b:skin>
- Paste the following Jquery code just below it:
<script> //<![CDATA[ $(document).ready(function () { $('[data-MBTdemo]').click(function (e) { e.preventDefault(); var target = e.target || e.srcElement; if ($(target).attr('target') == "_blank") { window.open("http://sitesmyself.blogspot.com/p/demo.html?url=" + $(target).attr('href'), '_blank'); } else { window.location = "http://sitesmyself.blogspot.com/p/demo.html?url=" + $(target).attr('href'); } }); $('[data-MBTdownload]').click(function (e) { e.preventDefault(); var target = e.target || e.srcElement; if ($(target).attr('target') == "_blank") { window.open("http://sitesmyself.blogspot.com/p/download.html?url=" + $(target).attr('href'), '_blank'); } else { window.location = "http://sitesmyself.blogspot.com/p/download.html?url=" + $(target).attr('href'); } }); }); //]]> </script>
- Change color paragraph by your URL of Demo, Download static page you've made already.
3. How to create Links?
- For Demo Link or Demo Button:
<a href="#" rel="nofollow" data-MBTdemo="true">DEMO</a>
<a href="#" rel="nofollow" data-MBTdownload="true">DOWNLOAD</a>
Opening in new tab
<a href="#" target="_blank" rel="nofollow" data-MBTdownload="true">DOWNLOAD</a>
0 comments