josex2r/jQuery-SlotMachine

Value

Closed this issue · 0 comments

Is there any way to capture the value at which planeMachine stopped?

Example:
I have a TAG (< div > </ div>)

Each div has input its due value, so that slotmachine stops at a particular select I have alert that show the value

alert (document.value ());

my code:

< div id="planeMachine" class="" >

< input type="text" name="fname" value="John"></ div >
< input type="text" name="fname" value="John1">< /div>
< input type="text" name="fname" value="John2">< /div>
</ div >
< button id="slotMachineButtonStop" type="button" class="btn btn-danger btn-lg">Shuffle
< button id="planeMachineStop" type="button" class="btn btn-primary btn-lg">Stop!

< script >
const btnShuffle1 = document.querySelector('#slotMachineButtonStop');
const planeMachine = document.querySelector('#planeMachine');
const btnStop1 = document.querySelector('#planeMachineStop');
const MplaneMachine = new SlotMachine(planeMachine, {
active: 1,
delay: 900,
});
< /script>

< script>
btnShuffle1.addEventListener('click', () => {

MplaneMachine.shuffle(7);
});

btnStop1.addEventListener('click', () => {
MplaneMachine.stop();
});
< /script >