jQuery를 사용하기 위해 다음 코드를 변경하는 데 어려움이 있습니다. 누구든지 올바른 방향으로 나를 가리킬 수 있을까요?jQuery로 자바 변환 코드
function addListItem() {
var listItem, container, dataList = document.getElementById('dataList');
// Create our list item
listItem = document.createElement('div');
listItem.setAttribute('data-bb-type', 'item');
listItem.setAttribute('data-bb-img', 'images/icons/icon11.png');
listItem.setAttribute('data-bb-title', 'Title ');
listItem.innerHTML = 'My description';
// Create a dummy container
container = document.createElement('div');
container.appendChild(listItem);
// Apply the styling
bb.imageList.apply([container]);
// Append the item
dataList.appendChild(container.firstChild);
// re-compute the scrolling area
if (bb.scroller) {
bb.scroller.refresh();
}
}
아마도 당신이 jQuery를 귀하의 시도를 게시 할 수있는, 우리는 당신이 직면 한 문제를 통해 작업을 도울 수 있습니다. 당신은 단순히 누군가가 당신을 위해 그것을 요구하는 것보다 더 많은 도움을받을 것입니다. – jackwanders
http://docs.jquery.com/Main_Page – rwilliams
왜 jquery로 변환해야합니까? 나에게 완벽하게 좋은 자바 스크립트처럼 보입니다. –