الزناد الماوس أدخل على عنصر عشوائي
-
15-11-2019 - |
سؤال
لدي هذا JavaScript: giveacodicetagpre.
أريد محاكاة تأثير مروم على صورة، ولكن بطريقة أو بأخرى لا تعمل وظيفة المرشح. حاولت أيضا giveacodicetagpre.
المحلول
Try this:
$.fn.rand = function(){
return this.eq(Math.floor(Math.random()*this.length));
};
$(".foto").rand().trigger("mouseover");
Note: you only have to define $.fn.rand
once, usually right after including jquery.
لا تنتمي إلى StackOverflow