さて、Prototypeで動作するように変換する必要があるjQueryコード行があります。
$(document).ready(function(){
if(navigator.userAgent.indexOf('Chrome')!=-1)
{
/* Applying a special chrome curosor,
as it fails to render completely blank curosrs. */
zoom.addClass('chrome');
}
});
ズームはクラス名であり、クロームが検出された場合はクラスクロームを追加したいと思います。
これまでのところ、プロトタイプについてはこれがあります:
document.observe("dom:loaded", function() {
Object.prototype.addClass = function(className) {
if (!this.hasClass(className)) { //if the class isn't there already
this.className += (' ' + className); //append it to the end of the class list
}
}
});
しかし残念ながら、それは私がグーグル検索で得ることができる限りです。
誰かが解決策を持っていますか?