Hi, I tried to make a proof of concept for my metro style app. this is my code:
<html> <head> <script src="jquery.min.js"></script> </head> <body style="height: 600px"> <div id="wrapper" style="width:10000px"> <div class="child" style="float: left; width: 200px; border-style: solid;">Left Stuff</div> <div class="child" style="float: left; width: 200px; border-style: solid;">Middle Stuff</div> <div class="child" style="float: left; width: 200px; border-style: solid;">Right Stuff</div> <div class="child" style="float: left; width: 200px; border-style: solid;">Right Stuff</div> <div class="child" style="float: left; width: 200px; border-style: solid;">Right Stuff</div> <div class="child" style="float: left; width: 200px; border-style: solid;">Right Stuff</div> <div class="child" style="float: left; width: 200px; border-style: solid;">Right Stuff</div> <div class="child" style="float: left; width: 200px; border-style: solid;">Right Stuff</div> </div> </body> </html> <script type="text/javascript"> $(document).ready(function() { $("#wrapper").wrapInner("<table cellspacing='30'><tr>"); $(".child").wrap("<td></td>"); document.documentElement.onmousewheel = function (event) { $('body').scrollLeft($('body').scrollLeft() - event.wheelDelta); }; }); </script>
The mousewheel event works fine in IE10 (Windows 8), so I created an html5 javascript metro style application containing only 2 files: the default.html file with the above code and the jquery.min.js file.
When I started the application, I had the same display, but horizontal scrolling did not work when using the mouse wheel, as if it worked, i.e. 10. Note: the mousewheel event is fixed in Metro (puts a breakpoint on this line "$ (" body "). ScrollLeft ($ ('body'). ScrollLeft () - event.wheelDelta);" but this is not scrolling.
What is the problem with the metro, and is there any other way to do horizontal scrolling.
thanks
source share