Eyes Of Siche
Guest book

jquery cookie

<script type="text/javascript">
<!--
	// jquery Cookie
	(function($){
		$.cookie = function(key, value, options) {
			if(arguments.length > 1) {
				var o = $.extend({}, $.cookie.defaults, options);

				if (value === null || value === undefined) {
					value = '';
					o.expires = -1;
				}
				if (o.expires.constructor != Date && o.expires > 0) {
					var today = new Date();
					today.setDate(today.getDate() + o.expires);
					o.expires = today;
				}
				// Create the cookie string
				document.cookie = key + '=' + value + (o.expires != 0?'; expires=' + o.expires.toUTCString() : '') + (o.path? '; path=' + (o.path) : '') + (o.domain? '; domain=' + (o.domain) : '') + (o.secure? '; secure' : '');
			} else {
				if(result = new RegExp(key+"=(.*?)(?:;|$)").exec(document.cookie))
					return decodeURIComponent(result[1]);
					return false;
				}
		}; //' $.cookie = function(key, value, options)

		$.cookie.defaults = {
			expires: 365,
			path: '/'
		} // '$.cookie.defaults
	})(jQuery);
	// /jquery Cookie

	function cookieSave(num){
		$.cookie("cookieTest", num, {expires:0, path:'/', secure:0});
	}
	function check(){
		alert($.cookie("cookieTest"));
	}
//-->
</script>

참~~~~ 쉽죠잉~? -_-;;

Posted by siche

2011/06/13 10:11 2011/06/13 10:11
,
Response
No Trackback , 3 Comments
RSS
http://eos.pe.kr/rss/response/190

Comments List

  1. 이현수 2011/06/22 10:10 # M/D Reply Permalink

    span 테그가 ........왜 저기 들어가 있을까 ....?

    1. siche 2011/06/23 11:42 # M/D Permalink

      ?? 뭔소리야~?? @_@

    2. 이현수 2011/06/25 18:48 # M/D Permalink

      syntax ?? 소스 여러가지 색으로 표현해주는 플러그인..
      그거로드되면 이상하게 보여

Leave a comment
[로그인][오픈아이디란?]

사용자 삽입 이미지

만들려다가 혹시나 찾아보니 역시나 있더군~ -_-;;
이래서 프레임웍을 쓰는건가~ 아 좋아~

다운로드 : http://jquery.andreaseberhard.de/pngFix/

Posted by siche

2010/09/03 17:43 2010/09/03 17:43
, ,
Response
No Trackback , No Comment
RSS
http://eos.pe.kr/rss/response/174

Leave a comment
[로그인][오픈아이디란?]

이미지 롤오버

자자 역시 가장 흔하고 가장 간단한 이미지 롤오버 부터 고고싱~
<script type="text/javascript">
<!--
$(function(){
    $("img.imgRollOver").mouseover(function(){
        $(this).attr("src",$(this).attr("src").replace("_off","_on"));
    });
    $("img.imgRollOver").mouseout(function(){
        $(this).attr("src",$(this).attr("src").replace("_on","_off"));
    });
});
//-->
</script>
<img src="img1_off.gif" class="imgRollOver" />
<img src="img2_off.gif" class="imgRollOver" />
자자 attr(key, value) 이놈은 해당 객체의 속성에 원하는 값을 넣을수 있다. replace는 문자열을 치환하는 놈이고 즉, mouseover를 하면 해당 이미지의 src 값에 _off 라는 문자를 _on으로 바꾸 값을 해당 이미지의 src 값을 넣는다~~ 요거란 말이지~
out은 그 반대고~ 암튼 요딴식이다~

Posted by siche

2010/08/30 09:38 2010/08/30 09:38
, ,
Response
No Trackback , No Comment
RSS
http://eos.pe.kr/rss/response/172

Leave a comment
[로그인][오픈아이디란?]

jQuery

전에도 jQuery 아성을 익히 들어 알고 있었지만서도 그동안 계속 prototype을 써왔기 때문에 쉽게 jQuery를 손대긴 어려움이 있었다.. 그동안 기본적으로 만들어서 써오던 놈들을 다시 다 바꾸기란..;;

암튼 이래저래 트랜드에 발 맞추어 나가기 위해 jQuery를 사용하기로 했고, 이후 이곳 포스트는 모두 jQuery를 사용하여 작성하기로 했다.


사용자 삽입 이미지

jQuery 다운받는 곳 : http://jquery.com/

Posted by siche

2010/08/30 09:27 2010/08/30 09:27
Response
No Trackback , No Comment
RSS
http://eos.pe.kr/rss/response/171

Leave a comment
[로그인][오픈아이디란?]
« 1 »
블로그 이미지

안돼는 것은 없다.. 항상 방법이 문제일 뿐이다.. 그 방법을 찾기 위해서는 노력할 뿐이다.. - siche

Archives

Recent Trackbacks

Calendar

«   2012/05   »
    1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30 31    

Site Stats

Total hits:
705383
Today:
18
Yesterday:
103