Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 499a960

Browse files
crbatesmdboom
authored andcommitted
Add jquery ui hover hook for buttons
1 parent d977828 commit 499a960

1 file changed

Lines changed: 17 additions & 4 deletions

File tree

lib/matplotlib/backends/web_static/index.html

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,30 @@
11
<html>
2-
<head>
3-
<script src="/static/mpl.js"></script>
2+
<head>
43
<link rel="stylesheet" href="/static/css/page.css" type="text/css">
54
<link rel="stylesheet" href="/static/css/boilerplate.css" type="text/css" />
65
<link rel="stylesheet" href="/static/css/fbm.css" type="text/css" />
76
<link rel="stylesheet" href="/static/jquery/css/themes/base/jquery-ui.min.css" >
87
<script src="/static/jquery/js/jquery-1.7.1.min.js"></script>
98
<script src="/static/jquery/js/jquery-ui.min.js"></script>
9+
<script src="/static/mpl.js"></script>
10+
<script>
11+
$(function(){
12+
// Hover states on the static widgets
13+
$( ".ui-button" ).hover(
14+
function() {
15+
$( this ).addClass( "ui-state-hover" );
16+
},
17+
function() {
18+
$( this ).removeClass( "ui-state-hover" );
19+
}
20+
);
21+
});
22+
</script>
1023
</head>
1124
<body
1225
onkeydown="key_event(event, 'key_press')"
1326
onkeyup="key_event(event, 'key_release')">
14-
<div style="margin-left: auto ; margin-right: auto ; width: 800px;">
27+
<div id="mpl-div" style="margin-left: auto ; margin-right: auto ; width: 800px;">
1528
<div id="mpl-warnings" class="mpl-warnings">
1629
</div>
1730

@@ -41,7 +54,7 @@
4154
<button id="{{ name }}"
4255
onclick="toolbar_button_onclick('{{ method }}');"
4356
role="button"
44-
style="margin-top: 0px;"
57+
aria-disabled="false"
4558
class="ui-button ui-widget ui-state-default ui-corner-all ui-button-icon-only">
4659
<span class="ui-button-icon-primary ui-icon {{ image }} ui-corner-all"></span>
4760
<span class="ui-button-text">{{ tooltip }}</span>

0 commit comments

Comments
 (0)