Friday, November 11, 2011

My Faceblog

I'm done doing the css of my blog. Now it looks like facebook homepage. But the real thing is, this is faceblog. hahahahha:D

Tuesday, November 8, 2011

checkbox act like a radio button code:

jQuery:
jQuery('.chck').click(function(){
jQuery('.chck:checked').not(this).removeAttr('checked');
});

html:
<input class="chck" type="checkbox" name="chckBox"/> Mr.
<input class="chck" type="checkbox" name="chckBox"/> Mrs.
<input class="chck" type="checkbox" name="chckBox"/> Ms.
 

Monday, October 17, 2011

CSS for png if your using jQuery sliders or rotators

img {
background: transparent;
-ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorstr=#00FFFFFF,endColorstr=#00FFFFFF)"; /* IE8 */
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#00FFFFFF,endColorstr=#00FFFFFF); /* IE6 & 7 */
zoom: 1;
}

if your using images in PNG format in your sliders or rotators... use this code to avoid black borders in IEs.. 

Thursday, September 29, 2011

jQuery tagCloud random font size

jQuery:
jQuery(document).ready(function(){
function setFontSize() {
var maxFontSize = 20;
var fontSize = Math.floor(Math.random() * maxFontSize + 14) + 'px';
return fontSize;
}
jQuery('.BlogTagCloud a').each(function() {
var a = $(this);
var cssFontSize = setFontSize();
a.css({fontSize: cssFontSize});
});
});

css:
.BlogTagCloud{
width:300px;
}
.BlogTagCloud a{
text-decoration:none;
font-family:tahoma;
color:#1a1a1a;
}

html:
<div class="BlogTagCloud ">
<a href="#">Lorem </a><a href="#">sit </a>
<a href="#">dolor </a><a href="#">consectetur </a>
<a href="#">ipsum </a><a href="#">amet</a>
<a href="#">aliquip </a><a href="#">laboris </a>
<a href="#">fugiat </a><a href="#">occaecat </a>
and so on.....
</div>

jQuery Loading

jQuery:
jQuery(window).load(function() {
jQuery("#welcome").fadeOut('fast');
});

css:
#welcome{
width:100%;
height:100%;
z-index:15;
position:fixed;
top:0;
left:0;
background:url("../images/loading3.gif") no-repeat center #ffffff;
opacity:0.8;
filter: alpha(opacity = 80);
}

html:
<div id="welcome"></div>

jQuery GET

jQuery:
function getQuerystring(key, default_)
{
if (default_==null) default_="";
key = key.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]");
var regex = new RegExp("[\\?&amp;]"+key+"=([^&amp;#]*)");
var qs = regex.exec(window.location.href);
if(qs == null)
return default_;
else
return qs[1];
}
var author_value = getQuerystring('author');

function changetoSpace($str){
$str= $str.replace("%20"," ");
return $str;
}

var a=unescape(author_value);

URL:
http://test.com?author=reyneil

OUTPUT:
reyneil

Monday, August 22, 2011

custom webform

Web forms enable visitors to inquire online and contact the owners of small businesses. This system provides the functionality to build forms that can alternately store the form data in the backend database or forward the data submitted in the form to an email address.