[SOLVED] Translation from JS Stackflow-example to functional PC


I need to move a div’s position upon a PC-event. Here is the googled example (https://stackoverflow.com/questions/6802956/how-to-position-a-div-in-a-specific-coordinates), of which I want to incorperate in PC:

function placeDiv(x_pos, y_pos) {
  var d = document.getElementById('yourDivId');
  d.style.position = "absolute";
  d.style.left = x_pos+'px';
  d.style.top = y_pos+'px';

I have tried with (below a PC-event):

var microXpos = this.perc; 
var tmpJoner = microXpos.toString()+"px";
this.floater.style.left = tmpJoner;

Can you provide a small sample project of what you are trying to achieve?

[regret the inconvenience] … as it works anyway :slight_smile:
{I was looking for the effect while having sideways events on looking for up/down-effects … classic}

Forum output: people can still read/use this as reference for similar challenges