jQuery 1.4 Released

script 2010. 1. 16. 22:25
javascript framework의 최고봉이라 할 수 있는 jQuery가 업데이트하여 1.4 버전을 발표했다.

자세한 내용은 jQuery 1.4 Released 페이지를 참조하고
대충 살펴보니 속도 개선을 한점과
setter함수(css(), val(), html() 등)에 function을 사용할 수 있는것
// find all ampersands in A's and wrap with a span
$('a').html(function(i,html){
  return html.replace(/&/gi,'&');
});
 
// Add some information to the title of the anchors
$('a[target]').attr("title", function(i,title){
  return title + " (Opens in External Window)";
});
core부분에서 element생성과 동시에 속성및 이벤트를 지정할 수 있는것
jQuery("
", { id: "foo", css: { height: "50px", width: "50px", color: "blue", backgroundColor: "#ccc" }, click: function() { $(this).css("backgroundColor", "red"); } }).appendTo("body");
이 외에도 추가되는 함수들이 더 있는데
jQuery 1.4 Released페이지와 API사이트를 참조하여 살펴봐야 할 듯

jQuery team이 무섭다 ㄷㄷ
점점 간단하게 개발할 수 있는데 속도까지 빨라지도 있다니 ㄷㄷ

: