Berhubung masih hari raya idul fitri saya selaku admin blog ini mengucapkan minal aidin walfaizin mohon maaf lahir dan batin :).

Postingan awal lebaran saya buat yang agak simpel bahkan sangat simpel yaitu Auto Block Pada Tag Code biasanya setiap kode diselubungi oleh tag pre namun untuk setiap kode pendek biasanya cukup ditandai dengan <code>...script...</code>.


Pemasangan Auto Block Tag Code pada blog:
Masuk ke edit template kemudian tambahkan CSS dan letakkan diatas kode ]]></b:skin>

CSS
Css disini meliputi: font, background, border dll dan dapat divariasi sesuka hati
code {
  font:normal 12px/14px Monaco,Monospace;
  background:rgba(255,255,255,.4);;
  border:1px solid #eee;
  padding:1px;
  cursor:default;
  border-radius:2px;
  -moz-border-radius:2px;
  -webkit-border-radius:2px;
}

Javascript
Letakkan script dibawah ini diatas kode </head>
<script type='text/javascript'>
$(function() {
    $('code').click(function() {
        var refNode = $(this)[0];
        if($.browser.msie) {
            var range = document.body.createTextRange();
            range.moveToElementText(refNode);
            range.select();
        } else if($.browser.mozilla || $.browser.opera) {
            var selection = window.getSelection();
            var range = document.createRange();
            range.selectNodeContents(refNode);
            selection.removeAllRanges();
            selection.addRange(range);
        } else if($.browser.safari) {
            var selection = window.getSelection();
            selection.setBaseAndExtent(refNode, 0, refNode, 1);
        }
    });
});
</script>
Kemudian Simpan.

Penerapan pada posting
Tambahkan pada setiap kode pendek yang akan di block dengan script <code>...isi...</code>

Tutorial ini hanya untuk newbe semata jika ada mastah yang kurang berkenan mohon maaf, karena saya disini masih belajar :D

Sumber refrensi: Taufik Nurrahman

Labels: ,

24 Komentar:

Blogger Beben Koben said on August 21, 2012 at 2:11 PM 

muridnya master Taufiq nih...xixixixi

Blogger Muhammad Irham said on August 21, 2012 at 6:29 PM 

@Beben Koben hehe ya gan, maklum masih nubi

Blogger Unknown said on August 23, 2012 at 12:14 AM 

Mangstab jg nih. . .

Anonymous Anonymous said on August 23, 2012 at 6:43 PM 

Kunjungan perdana... :)Mantap2 postingannya...

Anonymous sakit tenggorokan said on February 25, 2013 at 3:32 PM 

terimakasih banyak, ini yang saya cari

Anonymous pasca stroke said on February 25, 2013 at 3:35 PM 

langsung saja ijin TKP

Anonymous cara jadi agen said on February 25, 2013 at 3:37 PM 

selamat sore n salam kenal

Anonymous cara mengobati sinusitis said on February 25, 2013 at 3:39 PM 

salam kenal, ane newbe

Anonymous jelly gamat said on February 25, 2013 at 3:41 PM 

nice to post

Anonymous ace maxs said on February 25, 2013 at 3:44 PM 

langsung mau ke tkp saja ni sob

Anonymous murah said on February 25, 2013 at 3:45 PM 

nice to blog

Anonymous jantung bengkak said on February 25, 2013 at 3:47 PM 

selamat istirahat

Anonymous kanker paru paru said on February 25, 2013 at 3:48 PM 

solusi bila terkena kanker paru paru

Anonymous jus said on February 25, 2013 at 3:49 PM 

khasiat dari jus multikhasiat

Anonymous Cirebon-Cyber4rt said on July 4, 2013 at 12:41 PM 

manteeb gan :D

Anonymous KOLOM BERITA said on August 3, 2013 at 6:00 AM 

Ijin nyimak deh

Anonymous Web Developers Delhi said on January 5, 2015 at 3:57 PM 

This is the precise weblog for anybody who needs to seek out out about this topic. You notice so much its almost arduous to argue with you. You positively put a brand new spin on a subject that's been written about for years. Nice stuff, simply nice!

Blogger sri said on January 12, 2022 at 2:14 PM 

Thanks for sharing this.,
Leanpitch provides online training in Scrum Master, everyone can use it wisely.
Join Leanpitch 2 Days CSM Certification Workshop in different cities.


certified scrum master certification
agile scrum master certification

Blogger sri said on January 12, 2022 at 2:15 PM 

Thanks for sharing this.,
Leanpitch provides online training in Scrum Master, everyone can use it wisely.
Join Leanpitch 2 Days CSM Certification Workshop in different cities.
Scrum master certification online
csm certification online

Blogger sri said on January 12, 2022 at 2:17 PM 

Thanks for sharing this.,
Leanpitch provides online training in Scrum Master, everyone can use it wisely.
Join Leanpitch 2 Days CSM Certification Workshop in different cities.
csm training online
csm online training

Blogger sri said on January 12, 2022 at 2:17 PM 

Thanks for sharing this.,
Leanpitch provides online training in Scrum Master, everyone can use it wisely.
Join Leanpitch 2 Days CSM Certification Workshop in different cities.


certified scrum master
Scrum master

Blogger sri said on January 12, 2022 at 2:18 PM 

Thanks for sharing this.,
Leanpitch provides online training in Scrum Master, everyone can use it wisely.
Join Leanpitch 2 Days CSM Certification Workshop in different cities.
Best Scrum master certification
scrum master certification cost

Blogger sri said on January 12, 2022 at 2:19 PM 

Thanks for sharing this.,
Leanpitch provides online training in Scrum Master, everyone can use it wisely.
Join Leanpitch 2 Days CSM Certification Workshop in different cities.
csm certification

csm certification cost

Blogger kajal said on March 15, 2024 at 2:07 PM 

Nice post. for more information visit us on Top Digital Marketing Institutes in Solapur

Post a Comment

© 2012 - Koderator | Desain Oleh kimzigr| Classic Themplate Html5 & Css3 | Mesin Blogger