Skip to content

Instantly share code, notes, and snippets.

@leeleoo
leeleoo / js
Last active May 26, 2019 14:27
youdao quikly control
Element.prototype.trigger = function(event_name){
var event = document.createEvent('event')
event.initEvent(event_name,true,true)
this.dispatchEvent(event)
}
var elements = document.getElementsByClassName('controlBtn')
var current_btn = 0
var panel_container = document.createElement('div')
function optionFactor(el,index){
@leeleoo
leeleoo / index.html
Last active April 23, 2017 04:30
PmzBNe
<html lang="en">
<head>
<meta charset="UTF-8" />
<title>Document</title>
</head>
<body>
<div id='div'></div>
</body>
</html>