开发者

Can't get MozTransform to work with Javascript

I'm trying to get the zoom function for Firefox to work using javascript but no luck, what am I doing wrong?

    function zoomIn() {
        document.getElementById('increaseWrapper').style['MozTransform'] = 'scale(1.5)';
    }
开发者_Go百科

Thanks in advance.


Your code seems to work perfectly find in this jsFiddle in Firefox 6.

Remember, 'MozTransform' only applies to Mozilla derived browsers. Safari and Opera and others have their own name for that attribute until it becomes an endorsed standard.

If you're trying your code in mozilla 4+ browser, then there must be something else wrong with your code because what you have disclosed in your question works fine in the right browser with the right HTML.

Have you checked your browser's error console or debugger console to see if you're experiencing an javascript errors that might be keeping your code from executing?

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜