I have searched through dozens of posts to try to find the solution to this but I am very new to jQuery and can't seem to figure it out. Basically I have two elements that are hidden on page load.
<div id="correct" class="hidden">
<h5> CORRECT! </h5>
</div>
<div id="wrong" class="hidden">
<h5> NOPE! TRY AGAIN </h5>
</div>
I have an input box. When the user inputs the correct answer and presses submit the #correct div is shown.
function guessAnswer() {
$("button.guess-submit").click(function(event) {
if ( $('#guess-input').val() == answer) {
$('#correct').show();
$('#wrong').hide();
} else {
$('#wrong').show();
}
I am also using LazyLine Painter for svg drawing. When the #correct div is shown I want to edit one of the LazyLine options so that the drawing speed increases. Below is the basic code for LazyLine:
var $logo = $('#sketch');
$logo.lazylinepainter({
'svgData': svgData,
'strokeWidth': 1,
'speedMultiplier': 3,
'delay': 5,
'strokeColor': '#b5287b',
'drawSequential': true,
'ease': 'easeInOutQuad'
});
setTimeout(function(){
$logo.lazylinepainter('paint');
}, 10)