0

Hej folk,

actually I develope a small browsergame for my personal use.

The user should do scroll with his mouse over the map (like Google Maps) which I realized with utterscroll.js.

On the second the user should can build structures, delete and upgrade them on a fixed DIV-Grid. The number of the grid is the same like the position id of the place the user can build something.

Also for the build menu I need to href the grid DIVs but when I do this utterscroll can't scroll anymore and I don't know why it does it. :/

HTML

<div class="viewport">
<a href="#"><div id="grid">Grid 1</div></a>
<a href="#"><div id="grid">Grid 2</div></a>
<a href="#"><div id="grid">Grid 3</div></a>
<a href="#"><div id="grid">Grid 4</div></a>
...
</div>

"InGame"

All grids are linked DIVs (see above)

When I try to scroll with the mouse I "drag and drop" the link instead of scrolling trough the screen/map

screenshot

I only use the default utterscroll.js.

I hope you guy's can help!

rumpetroll

  • It's not clear what you are asking, but using duplicate id's = trouble!! Use classes. – yezzz Jun 05 '16 at 19:28
  • Thanks for you help. What I mean is, that Utterscroll have to scroll on mouseDown even if linked divs unter the mouse cursor. Don't know how to explain :/ – rumpetroll Jun 05 '16 at 19:45
  • Post sample code. Again, duplicate id's should never be done, and often cause trouble. – yezzz Jun 05 '16 at 19:51

0 Answers0