开发者

Can't get MozTransform to work with Javascript

开发者 https://www.devze.com 2023-04-06 04:00 出处:网络
I\'m trying to get the zoom function for Firefox to work using javascript but no luck, what am I doing wrong?

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

精彩评论

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