Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

182
Views
In a series of dynamically generated geographical image maps, why does the repositioning only work on the first image?

I'm generating and showing a series of geographic image maps. For 1 screen resolution, I have to adjust the position of each map in the series. The reposition works for the 1st image, but not any of the subsequent images. The code that moves through the series of images follows.

var divNum = 0;

function rotate() { // Simulation.

  var nx = divNum + 5;
  var daDiv = 'yr' + divNum;

  if (divNum != 0) {
    var daDivPrev = 'yr' + (divNum - 1);
    var cmdx = daDivPrev + \".style.visibility='hidden';\";
    eval(cmdx);
  }

  document.getElementById(daDiv).style.zIndex = '' + nx;

  if (screen.height == 768) {
    document.getElementById('mapx').style.position = 'absolute';
    document.getElementById('mapx').style.left = '26%';
  }

  var cmdx = daDiv + \".style.visibility='visible';\";
  eval(cmdx);

  if (divNum > 3) return; // Stop at 4 because of advance number.

  divNum++; // advance divNum to next div ID
  setTimeout('rotate();', 3000);

}

setTimeout('rotate()', 2000); // Rotate.

The 'mapx' div is wrapped around the img tag just prior to the map generation.

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!