Closed ozeone closed 7 years ago
Hi, I am trying to switch from using the HTML 5 tags to initilaize WeheelNav to using JavaScript. I got everything working except the data-wheelnav-navitemimg, how can i do this using JavaScript?
HTML 5 tags i want to replace
<div id="divWheel" data-wheelnav data-wheelnav-titlewidth="45" data-wheelnav-titleheight="45" data-wheelnav-slicepath="CogSlice" data-wheelnav-spreaderradius="20" data-wheelnav-navangle="180" data-wheelnav-slicetransform="RotateTitleTransform" data-wheelnav-wheelradius="105"> <div data-wheelnav-navitemimg="@Url.CloudUrl("/assets/dashboard/icon-mok.png")" onmouseup="setUser('#tab-mok');"></div> <div data-wheelnav-navitemimg="@Url.CloudUrl("/assets/dashboard/icon-kevin.png")" onmouseup="setUser('#tab-kevin');"></div> <div data-wheelnav-navitemimg="@Url.CloudUrl("/assets/dashboard/icon-henrik.png")" onmouseup="setUser('#tab-henrik');"></div> <div data-wheelnav-navitemimg="@Url.CloudUrl("/assets/dashboard/icon-anna.png")" onmouseup="setUser('#tab-anna');"></div> </div>
Javascript i am using (see my failed try to use image)
var wheel = new wheelnav("divWheel"); wheel.selectedNavItemIndex = null; wheel.initWheel(["<img src=\"test.gif\" />", "create", "navigate", "refresh"]); wheel.wheelRadius = 105; wheel.navAngle = 180; wheel.titleWidth = 45; wheel.titleHeight = 45; wheel.spreaderRadius = 20; wheel.slicePathFunction = slicePath().CogSlice; wheel.createWheel();
What am i missing here?
Oh, Thanks again for an awesome script
Click here and click the 'icons' button. :)
wheel.initWheel(["imgsrc:test.gif", "create", "navigate", "refresh"]);
Hi, I am trying to switch from using the HTML 5 tags to initilaize WeheelNav to using JavaScript. I got everything working except the data-wheelnav-navitemimg, how can i do this using JavaScript?
HTML 5 tags i want to replace
Javascript i am using (see my failed try to use image)
What am i missing here?
Oh, Thanks again for an awesome script