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

249
Views
Javascript, Jquery - can't change content of div on phone, works on desktop

I can't change content of div when using mobile view, it works perfectly fine when using desktop view. The output in console is correct, but its not shown in div.

Example of code:

<div id="dateandtime" class=""></div>
<div id="dateandtime2" class=""></div>
<div id="dateandtime3" class=""></div>
<script>
    jQuery(document).ready(function() {
        let datea = "${dogodek.eventDate}".split(" ")[0];
        let timea = "${dogodek.eventDate}".split(" ")[1];
        let timeArray = timea.split(":");
        timea = timeArray[0] + ":" + timeArray[1];
        console.log('date: ', datea, ', time: ', timea);
        $('#dateandtime2').html(datea);
        $('#dateandtime3').text(datea);
        $('#dateandtime').append(datea);
        console.log("done");
        document.getElementById('dateandtime').innerHTML += 'Extra stuff';
    });
    document.getElementById('dateandtime').innerHTML += 'Extra stuff';
</script>
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!