开发者

Prevent javascript function from changing style attributes

I am working with an unnamed javascript plug-in.

During a certain operation of said plugin, under a specific circumstance, the plugin changes the style attributes of certain elements on my page.

Without delving into the plugin code itself (I want to avoid that if possible), is there a way to prevent the style attributes of those elements from being altered? I'm thinking perhaps a block somehow, or a way to lock the current style attribute to prevent changes?

I'm leaving the plugin unnamed because, while it would be great if someone actually could walk me though editing a plugin's code to meet my needs, I strongly doubt that's going to happen. And if there is a solution that fits my above perimeters, it would be m开发者_开发技巧uch more useful and easier to implement.

Thanks in advance for any advice.


You could always add !important to the style rules that you wish to prevent the plugin from overriding (I'm assuming that it inserts inline styles.)

Like this (fiddle)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜