Membuat Hide/Show (Expand/Collapse:+/-) Labels.

Trik Blogger

Sebelum itu pastikan labels sudah di aktifkan.

Sekiranya labels sudah di aktifkan, sila ikuti langkah-langkah mudah untuk membuat Hide/Show (Expand/Collapse:+/-) Labels.

1. Sign in akaun blogger.

2. Pilih LAYOUT --> EDIT HTML.

3. Perhatian !!! Tidak perlu EXPAND WIDGET TEMPLATE.

4. Cari kod ini.

<b:widget id='Label1' locked='false' title='Labels' type='Label'/>

5. Gantikan kod di atas dengan kod ini.

<b:widget id='Label2' locked='false' title='Labels and Feeds' type='Label'>
<b:includable id='main'>
<script type='text/javascript'>
//<![CDATA[
if(typeof(rnd) == 'undefined') var rnd = '';
rnd = Math.floor(Math.random()*1000);
rnd = 'id-' + rnd;
document.write('<a href="#" onclick="tmp = document.getElementById(&quot;' + rnd + '&quot;); tmp.style.display = (tmp.style.display == &quot;none&quot;) ? &quot;block&quot; : &quot;none&quot;; return false;" style="float:left;margin-right:5px;">');
//]]>
</script>[+/-]
<script type='text/javascript'>
//<![CDATA[
document.write('<\/a>');
//]]>
</script>
<b:if cond='data:title'>
<h2><data:title/></h2>
</b:if>
<div class='widget-content'>
<script type='text/javascript'>
//<![CDATA[
document.write('<div id="' + rnd + '" style="display:none;">');
//]]>
</script>

<ul>
<b:loop values='data:labels' var='label'>
<li>


<b:if cond='data:blog.url == data:label.url'>
<data:label.name/>
<b:else/>
<a expr:href='data:label.url'><data:label.name/></a>
</b:if>
</li>
</b:loop>
</ul>

<script type='text/javascript'>
//<![CDATA[
document.write('<\/div>');
//]]>
</script>
<b:include name='quickedit'/>
</div>
</b:includable>
</b:widget>

6. Pilih PREVIEW.

7. Jika anda berpuashati dengan hasilnya SAVE TEMPLATE.

8. Selamat Mencuba.

No comments:

Post a Comment