Can anyone explain how/why to use jQuery's CSS hooks?

I have been looking into jQuery's css hooks, and some that are available on Github. I have been able to use them to set some styles with jQuery, but as far I understand it, it only gives me an overly complex way to set a css style. I am obviously missing the point... What can I do with them? Can I make Opera support css columns for example? if so, how? Thanks for your help!

$(".sub").css({
            'columnWidth':'120px',
            'columnRuleStyle':'dotted',
            'columnRuleWidth':'1px',
            'columnRuleColor':'#ccc',
            'columnGap':'10px'
            });

By adding support for these new or browser specific CSS properties it yes allows you to set then with the $.fn.css() function but it also adds the ability to animate them, which is the main uses for the hooks.

http://proj.jetless.org/AWESOME-TIME/


csshooks is good way to implement the new css3 styles across browsers. You can create a csshook plugin for the border-radius which does feature detection and implemented border-radius differently on browsers that support it. Explains it all right here:

http://api.jquery.com/jQuery.cssHooks/


从事情的角度来看,这些CSS钩子对于支持核心.css()函数不支持的浏览器特定CSS属性很有用。

链接地址: http://www.djcxy.com/p/50442.html

上一篇: C#HttpListener'坏请求'问题

下一篇: 任何人都可以解释如何/为什么要使用jQuery的CSS钩子?