Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save tranquangchau/ed6a6dbdf9f9ad69d895 to your computer and use it in GitHub Desktop.
Save tranquangchau/ed6a6dbdf9f9ad69d895 to your computer and use it in GitHub Desktop.
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>dblclick demo</title>
<style>
div {
background: blue;
color: white;
height: 100px;
width: 150px;
}
div.dbl {
background: yellow;
color: black;
}
</style>
<script src="https://code.jquery.com/jquery-1.10.2.js"></script>
</head>
<body>
<div></div>
<span>Double click the block</span> Calling click on an option element inside a select doesn't update the model
<script>
$('html').dblclick(function (event) {var selObj = window.getSelection();
alert(selObj);});
var divdbl = $( "div:first" );
divdbl.dblclick(function() {
divdbl.toggleClass( "dbl" );
});
</script>
</body>
</html>
@tranquangchau
Copy link
Author

Nô nê:


<!doctype html>
<html lang="en">
<head>
  <meta charset="utf-8">
  <title>dblclick demo</title>
  <style>
  div {
    background: blue;
    color: white;
    height: 100px;
    width: 150px;
 }
  div.dbl {
    background: yellow;
    color: black;
  }
  </style>
  <script src="https://code.jquery.com/jquery-1.10.2.js"></script>
</head>
<body>
 <script //src='D:/test/speak_list/responsivevoice.js'></script>
<script //src='http://code.responsivevoice.org/responsivevoice.js'></script>
<div></div>
<span>Double click the block</span> Calling click on an option element inside a select doesn't update the model


<script>
var str2 = 'men';
$('html').dblclick(function (event) {var selObj = window.getSelection().toString(); 
    //alert(str2);
//var str2 = selObj;
responsiveVoice.speak(selObj);
});



var divdbl = $( "div:first" );
divdbl.dblclick(function() {
  divdbl.toggleClass( "dbl" );
});
</script>

</body>
</html>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment