javascript - JQuery Simulating mouseover event is not working with chrome extensions -


i'm trying create chrome extension simulates .mouseover() event.

here sample of page i'm trying simulate event.

<div class="hand card-stack" aria-disabled="false"> ... <div id="card-c181" class="card face-up ui-draggable">     <div class="face"></div>     <div class="back"></div> </div> ... </div> 

when put mouse on divs class value changes , i'm trying write script detect change of class name automatically , best idea simulate .mouseover()

so before write actual inject code test them in chrome console , work fine when inject them don't...

here inject.js

$(document).ready(function(){ $(main);     }); function main() {   x = $('.card.face-up.ui-draggable').mouseover();   alert("done"); } 

manifest.json

{   "name": "testing",   "version": "1.0",   "manifest_version": 2,   "description": "simulating mouseover",   "homepage_url": "http://example.com",   "background": {     "scripts": ["background.js", "jquery-1.12.4.js"] ,     "persistent": true   },   "browser_action": {     "default_title": "inject!"   },   "content_scripts": [{       "js": ["jquery-1.12.4.js"],       "matches": ["https://*/*"]   }],   "permissions": [     "https://*/*",     "http://*/*",     "tabs"   ] } 

so when click on extension button alerts , mouseover don't work.. in chrome console works. i've tried .mouseenter(), .trigger("mouseover"),.on` nothing worked in inject.js in chrome console works.


Comments

Popular posts from this blog

resizing Telegram inline keyboard -

command line - How can a Python program background itself? -

php - "cURL error 28: Resolving timed out" on Wordpress on Azure App Service on Linux -