를 추가 나는이 DOM에 새 CSS 규칙을 추가 할 수 있도록 Rule PluginjQuery를 규칙 플러그인 - 내 프로젝트를 위해 새 규칙
그것의 위대한처럼 보이는 jQuery를 사용할 필요가있다.
하지만 어떻게 새 규칙을 만들고이를 dom에 추가 할 수 있습니까 ??
These are the methods, the plugin adds to the different namespaces.
jQuery.fn
- sheet: returns the stylesheets from the matched styles and links.
- cssRules: return all the rules from all the given sheets.
- ownerNode: returns the nodes that belong to the given sheet (opposite to sheets).
- cssText: returns the text of the first matched style/link.
jQuery.rule
- constructor($.rule):
- 1st argument: nothing, a rule filter, rule literal, css rule or array of rules.
- 2nd argument: nothing, node filter for link/style, nodes link/style.
- sheets: returns the sheets that match the selector or all of them if none.
- clean: converts a rule literal, to array of rules.
- parent: returns the parent of a rule, neccesary for IE.
- outerText: return the selector with the rules of the given rule.
- text: gets/sets the cssText of the rule.
jQuery.rule.fn
- append: will add one or more styles in the form of "attr:value; attr:value" to the matched rules.
- css : sets a value to all matched rules.
- outerText: return $.rule.outerText of the first rule.
- text: sets the cssText of the rules, or gets the cssText from the first one.
- appendTo: appends the matched rules to the specified stylesheet(1), can be a selector, dom element, sheet.
All these methods (from jQuery.rule.fn) are equal (or very similar) to those in jQuery.fn, but for CSS Rules.
add, andSelf, animate, appendTo, attr, css, dequeue,
each, end, eq, fadeIn, fadeOut, fadeTo, filter, get,
hide, index, is, map, not, pushStack, queue, remove,
setArray, show, size, slice, stop, toggle.
Some calls to show and hide behave unexpectedly sometimes. Some styles and animations might fail.
이 제발 도와주세요 :
문서는 말한다.
감사합니다.
참고 : jQuery에 대해 알고 있다면 쉽게 할 수 있지만 초보자라면 열심히 할 것이라고 확신합니다. Google에서이 문제에 대한 정보를 얻으려고 노력했지만 아무것도 찾을 수 없습니다. 나는 질문에 익숙하다 What you tried ?
, 여기 나는 모른다. 제발 시작입니다. 고맙습니다 !
예를 들면 현재 위치 : http://flesler.webs.com/jQuery.Rule/ –
@AlanKuras는 그 이전에 확인하지만, 추가 할 수있는 방법을 찾을 수 없습니다 새로운 규칙, – Red