1
결합, 나는 내 말 ID를, 사용자 정의 할 수있는 플러그인 내부에 생성 된 div를 원하는 :jQuery를 플러그인 기본 옵션 접두사, 문자열 내가 jQuery 플러그인을 짠거야
(function($) {
$.fn.plugin = function (options) {
var defaults = {
box_id = "nos-box_id",
shoes_id = "nos-shoes_id"
}
...
...
...
return this;
})(jQuery);
그리고 난이 원하는 :
(function($) {
$.fn.plugin = function (options) {
var defaults = {
plugin_prefix = "nos-",
box_id = _somethinghere_ + "box_id",
shoes_id = _somethinghere_ + "shoes_id"
}
...
...
...
return this;
})(jQuery);
(이 경우, "호"에서) defaults.plugin_prefix하기 위해 같다 "는이 somethinghere"할 수 있습니다.
아무도 내가 이것을 알아낼 수 있도록 도와 줄 수 있습니까?
Thx!
감사합니다! 정말 도움이! –