반응형
Wordpress Database Class - MySQL 유형 비트
저는 MySQL 데이터베이스와 통신하기 위해 워드프레스 내부의 WPDB 객체를 사용하고 있습니다.내 데이터베이스에 다음과 같은 유형의 열이 있습니다. , 그러나 워드프레스는 이것들을 다음과 같이 추출하지 않습니다.$(selector).after(..)
$(selector).insertAfter(..)
아니면
(그들은 내 로컬 머신에서 실행했습니다).
질문:.
워드프레스의 데이터베이스 값이 있다면 간단한 비교는 할 수 없습니다.
$(document).ready(function(){
$('div.app').myPlugin();
});
$('div').css({
opacity: .1 // opacity in modern browsers, filter in IE.
});
// higher level interfaces (facades) for $.ajax();
$.getJSON();
$.get();
$.getScript();
$.post();
// jQuery utilizes it's own event system implementation on top of DOM events.
$('div').click(function(){})
$('div').trigger('click', function(){})
$.each(function(){});
$('div').each(function(){});
$('div').toggle(function(){}, function(){});
$.proxy(function(){}, obj); // =oP
이것은 로컬 머신의 문제가 아니라 생산에서만 문제가 되었습니다.
$('<div class="hello">world</div>');
// this feels like cheating...
$.fn.plugin = function(){}
$('div').plugin();
// CONFIG is shared
$.fn.plugin = function(CONFIG){
CONFIG = $.extend({
content: 'Hello world!'
}, CONFIG);
this.html(CONFIG.content);
}
데이터베이스의 결과에 따라 브라우저가 보여주는 출력은 다음과 같습니다.
방법을 주목합니다.
그리고.
$('#someDiv').addClass('green'); // a single DOM element
$('div').addClass('green'); // a collection of DOM elements
줄의 크기를 나타내다
, 연관된 가치는 없습니다이 값은 다음 값으로 채워야 합니다.
기능적 프로그래밍의 관점에서 볼 때, jQuery는 모나드입니다.모나드는 동작에 개체를 전달하고 수정된 개체를 반환하여 다음 동작에 전달하는 구조입니다.조립라인처럼.
위키피디아 기사는 정의를 매우 잘 다루고 있습니다.
언급URL : https://stackoverflow.com/questions/3631039/design-patterns-used-in-the-jquery-library
반응형
'source' 카테고리의 다른 글
GCC에서 이니셜라이저 주변의 브레이스가 누락됨 (0) | 2023.09.19 |
---|---|
장고에서 필터로 최신 기록 가져오기 (0) | 2023.09.14 |
Wordpress Database Class - MySQL Type Bit (0) | 2023.09.14 |
URL의 앵커 부분이 웹 서버로 전송되고 있습니까? (0) | 2023.09.14 |
워드프레스 블로그에서 MS SQL에서 외부 데이터를 검색하려면 어떻게 해야 합니까? (0) | 2023.09.14 |