# wheel-of-fortune cant get json result ------ Github: https://github.com/TedyL/wheel-of-fortune myCode Html ```htmlembedded= <div class="spin-container"> <div class="spinflapper"></div> <div class="spinit" id="spinneratlas" style="background-image: url('images/gameboard.png')"> <div class="" data-spinit-id="a1" data-spinit-start="0" data-spinit-end="45"></div> <div class="" data-spinit-id="b2" data-spinit-start="45" data-spinit-end="90"></div> <div class="" data-spinit-id="c3" data-spinit-start="90" data-spinit-end="135"></div> <div class="" data-spinit-id="d4" data-spinit-start="135" data-spinit-end="180"></div> <div class="" data-spinit-id="e5" data-spinit-start="180" data-spinit-end="225"></div> <div class="" data-spinit-id="f6" data-spinit-start="225" data-spinit-end="270"></div> <div class="" data-spinit-id="g7" data-spinit-start="270" data-spinit-end="315"></div> <div class="" data-spinit-id="h8" data-spinit-start="315" data-spinit-end="360"></div> </div> <button class="btn-go" id="dolo" type="button"> </button> </div> <script src="js/plugin/transit.js?t=202108121613"></script> <script src="js/plugin/spinit.js?t=202108121613"></script> <script> $(document).ready(function(){ console.log('OK1'); $("#spinneratlas").spinit({ startDegree: -7, clockwise: true, installUrl: null, // return result as json luckyUrl: "/luckyDraw.php", // spin lucky draw keyUrl: null, // encryption key url }); $(document).on("click", "#dolo", function(){ console.log('OK2'); $("#spinneratlas").spinit("serverSpin", function(data){ console.log(data); console.log('OK3'); alert('doen'); // I want get result data(is a JsonString) // but is cant'n do // even alert is No effect }); console.log('OK4'); }) }); </script> ``` luckyDraw.php ```php= $array = ['success' => '1', 'id'=> 'e5']; header('Content-type: application/json'); echo json_encode($array); ``` view ![](https://i.imgur.com/jcLaXu2.png)
×
Sign in
Email
Password
Forgot password
or
By clicking below, you agree to our
terms of service
.
Sign in via Facebook
Sign in via Twitter
Sign in via GitHub
Sign in via Dropbox
Sign in with Wallet
Wallet (
)
Connect another wallet
New to HackMD?
Sign up