fixed the compatibility issue when using jQ1.4+