fbpx

Astroid 2.4 Landed with Joomla 4 Compatibility Download Now

Welcome, Guest
Username: Password: Remember me

TOPIC: javascripts code don't work

javascripts code don't work 3 weeks 1 day ago #24843

  • hugkaz
  • hugkaz's Avatar
  • Offline
  • New Member
  • Posts: 3
  • Karma: 0
Hello !
i am hugues kazadi a jdbuilder user.
why javascritp codes do not work on jdbuilder when inserted.

for exemple :

<!DOCTYPE html>
<html>
<head>
<title>pona musiki</title>
<meta charset="utf-8">
<link rel="stylesheet" type="text/css" href="ma.css">
</head>
<body>
<div class="card">
<div class="p">
<img src="menu m.png" onclick="toggle();">
</div>
</div>
<div class="card">
<div class="p">
<img src="menu m.png" onclick="toggle();">
</div>
</div>
<div class="trailer">
<video src="old.mp4" controls="true"></video>
<img src="close.png" class="close" onclick="toggle();">
</div>

<script type="text/javascript">
function toggle(){
var trailer = document.querySelector('.trailer');
var video = document.querySelector('video');
trailer.classList.toggle('active');
video.currentTime = 0;
video.pause();
}
</script>
</body>
</body>
</html>

css work but only javascript which does not work. why? and what can i do ?
The administrator has disabled public write access.

javascripts code don't work 3 weeks 1 day ago #24845

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Posts: 4131
  • Thank you received: 605
  • Karma: 107
It could be that an editor is stripping your code out. Can you see the code output on the frontend?

Thanks,
Chetan
Thank You,
If you like our support and products, tweet us at joomdev and let the world know about it.
The administrator has disabled public write access.
Moderators: chandandeep
Time to create page: 0.280 seconds