Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Javascript to re-position buttons

Explorer ,
Dec 18, 2016 Dec 18, 2016

This code below works for the button image, but the button is no longer clickable after re-positioning.

var obj = document.getElementById( 'myButtonc' );

var posX = parseInt( obj.style.left );

var posY = parseInt( obj.style.top );

obj.style.left = ( posX + 200 ) + 'px';

obj.style.top = ( posY + 200 ) + 'px';

Could someone please explain the code to move a clickable button?

I realize adding multi-states would work well, especially because I'm re-positioning all the buttons to the same x-y positions.  I would absolutely use multi-states for this if I could edit and apply a state to every button at once.

425
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Feb 09, 2017 Feb 09, 2017
LATEST

I have the same problem. It seems like only the standard state of the button is in the new position. The rollover- and down-states remain at the old position. Maybe somebody knows a solution, that would be really helpful.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Help resources