0
0
mirror of https://github.com/Doodle3D/doodle3d-client.git synced 2024-11-25 10:37:56 +01:00

Bind click buttons to ‘click’ event to prevent double triggers.

prev/next buttons are now initially disabled.
This commit is contained in:
Wouter R 2013-12-11 17:57:29 +01:00
parent 997c34a532
commit 076b69500e
2 changed files with 11 additions and 11 deletions

View File

@ -116,14 +116,14 @@ $(function() {
function enableButton(elem, handler) { function enableButton(elem, handler) {
//var elem = $('#'+domId); //var elem = $('#'+domId);
elem.removeClass("disabled"); elem.removeClass("disabled");
elem.unbind('touchstart mousedown'); elem.unbind('click');
elem.bind('touchstart mousedown', handler); elem.bind('click', handler);
} }
function disableButton(elem) { function disableButton(elem) {
//var elem = $('#'+domId); //var elem = $('#'+domId);
elem.addClass("disabled"); elem.addClass("disabled");
elem.unbind('touchstart mousedown'); elem.unbind('click');
} }
function showOrHideThermo() { function showOrHideThermo() {

View File

@ -33,8 +33,8 @@
<div class='sidebutton shadowright'></div> <div class='sidebutton shadowright'></div>
<img class="btnNew btn" src="img/buttons/btnNew.png" /><br/> <img class="btnNew btn" src="img/buttons/btnNew.png" /><br/>
<div class="btnsPrevNext" style="text-align:center"> <div class="btnsPrevNext" style="text-align:center">
<img class="btnPrevious btn" src="img/buttons/btnLeft.png"> <img class="btnPrevious btn disabled" src="img/buttons/btnLeft.png">
<img class="btnNext btn" src="img/buttons/btnRight.png"> <img class="btnNext btn disabled" src="img/buttons/btnRight.png">
<!-- <div id="txtSketch"></div> --> <!-- <div id="txtSketch"></div> -->
</div> </div>
<img class="btnSave btn" src="img/buttons/btnSave.png" /><br/> <img class="btnSave btn" src="img/buttons/btnSave.png" /><br/>