DERS - Jquery ve Tag Cloud

Php, Asp, Perl, Html - DERS - Jquery ve Tag Cloud ...

Cevapla
DERS - Jquery ve Tag Cloud
xcoder isimli Üye şimdilik offline konumundadır

xcoder(35)

xxx

Webmaster / Yalova

Standart

DERS - Jquery ve Tag Cloud

Alt 24-08-2009 #1
Sponsorlu Bağlantılar

Jquery Framework'ü ile tag cloud yapımı :

Gereçler :
Jquery

javascript:
$(document).ready(function() {
	var max_tag = 0;
	$(".tags_cloud").find("a").each(function() {
		if($(this).attr("tag_count") != "") {
			if(max_tag < parseInt($(this).attr("tag_count"))) {
				max_tag = parseInt($(this).attr("tag_count"));
			}
		}
	});
	
	$(".tags_cloud").find("a").each(function() {
		if($(this).attr("tag_count") != "") {
			var percent = parseInt($(this).attr("tag_count")) / max_tag ;
			if(percent < 0.4) {
				percent = 0.4;
			}
			$(this).css("font-size",percent+"em");
		}
	});

});


HTML :
				<div class="tags_cloud">
								<a href="/Search/plus"  tag_count="4" title="plus ">plus</a>
								<a href="/Search/Center"  tag_count="3" title="Center ">Center</a>
								<a href="/Search/Euro"  tag_count="4" title="Euro ">Euro</a>
								<a href="/Search/TM"  tag_count="3" title="TM ">TM</a>

								<a href="/Search/Company"  tag_count="4" title="Company ">Company</a>
								<a href="/Search/AR"  tag_count="3" title="AR ">AR</a>
								<a href="/Search/Articul"  tag_count="3" title="Articul ">Articul</a>
								<a href="/Search/creativo"  tag_count="4" title="creativo ">creativo</a>
								<a href="/Search/Ltd."  tag_count="3" title="Ltd. ">Ltd.</a>
								<a href="/Search/2Dutcmen.com"  tag_count="4" title="2Dutcmen.com ">2Dutcmen.com</a>

								<a href="/Search/e"  tag_count="10" title="e ">e</a>
								<a href="/Search/Creative"  tag_count="17" title="Creative ">Creative</a>
								<a href="/Search/Communication"  tag_count="7" title="Communication ">Communication</a>
								<a href="/Search/Comunicacao"  tag_count="10" title="Comunicacao ">Comunicacao</a>
								<a href="/Search/promotion"  tag_count="6" title="promotion ">promotion</a>
								<a href="/Search/Graphic"  tag_count="4" title="Graphic ">Graphic</a>

								<a href="/Search/Equipe"  tag_count="3" title="Equipe ">Equipe</a>
								<a href="/Search/Promo"  tag_count="3" title="Promo ">Promo</a>
								<a href="/Search/Business"  tag_count="3" title="Business ">Business</a>
								<a href="/Search/Agência"  tag_count="3" title="Agência ">Agência</a>
						</div>
CSS:

.tags_cloud  , .tags_cloud a{
		font-size:32px;	
	}
Bu mesajdan alıntı yap
Sponsor Links

Grafikerler.net Reklamları

Cevapla

Tags
jquery, tag cloud

Benzer Konular
Konu Konu Bilgileri Forum Cevaplar Son Mesaj
Jquery ile resim kaydıraç Bayfresh Php, Asp, Perl, Html 2 27-06-2009 17:06:13
JQuery sIFR eklentisi ve Kullanımı / sIFR Nedir ? xcoder Web Tasarımı 6 07-06-2009 01:34:24
Ders 2 kasta095 Rusça Öğrenelim 6 12-05-2009 21:15:02
ders... ŞENGÜL BOZKURT Graficafe 1 06-05-2009 13:24:13
web ders ...grafixo... Web Tasarımı 6 20-01-2009 15:03:56

Kapat
Şifremi Unuttum?