Created
December 31, 2012 10:59
-
-
Save eftalyurtseven/4419006 to your computer and use it in GitHub Desktop.
jQuery ile Method yazmak ve jStyle Methodu
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8" /> | |
<title>Eftal Yurtseven Method Kullanımı</title> | |
<link rel="stylesheet" href="style.css"/> | |
<script type="text/javascript" src="http://code.jquery.com/jquery-1.8.3.min.js"></script> | |
<script type="text/javascript" src="jStyle.js"></script> | |
<script type="text/javascript"> | |
$(function(){ | |
$("#wrapper").click(function(){ | |
$(this).jStyle("deneme","#998855","1px solid #887744", "14px Segoe UI", "#fff"); | |
$(this).jStyle2("deneme", "20","20"); | |
}); | |
}); | |
</script> | |
</head> | |
<body> | |
<!-- Wrapper --> | |
<div id="wrapper" class="deneme"> | |
Eftal Yurtseven » Method Kullanımı | |
</div> | |
<!--#Wrapper --> | |
</body> | |
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(function(){ | |
$.fn.jStyle = function(elementClass,backgroundColor, border, font, fontColor){ | |
$("."+elementClass).css({ | |
"background-color" : backgroundColor, | |
"border" : border, | |
"font" : font, | |
"color" : fontColor | |
}); | |
} | |
$.fn.jStyle2 = function(elementClass, padding, margin){ | |
$("."+elementClass).css({ | |
"margin" : margin, | |
"padding" : padding | |
}); | |
} | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Eftal Yurtseven | |
*/ | |
body{margin: 0; padding: 0; background: #984532} | |
*{margin: 0; padding: 0; list-style-type: none; border: none} | |
#wrapper{width: 1000px; margin: 20px auto; background: #fff; font: 12px Segoe UI; padding: 10px}/* | |
* Eftal Yurtseven | |
*/ | |
body{margin: 0; padding: 0; background: #984532} | |
*{margin: 0; padding: 0; list-style-type: none; border: none} | |
#wrapper{width: 1000px; margin: 20px auto; background: #fff; font: 12px Segoe UI; padding: 10px} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment