Home » Javascript » I can't understand why cordova link and Javascript coding is not working

I can't understand why cordova link and Javascript coding is not working

Posted by: admin October 29, 2018 Leave a comment

Questions:

Below is my cordova link which I’ve added in my HTML code but it’s not working.

<script type="text/javascript" src="cordova.js"></script>

I’ve added some Javascript below but I can’t understand how to apply it.

$(function(){
var slideIndex = 1;
showDivs(slideIndex);

function plusDivs(n) {
  showDivs(slideIndex += n);
}

function showDivs(n) {
  var i;
  var x = document.getElementsByClassName("mySlides");
  if (n > x.length) {slideIndex = 1}    
  if (n < 1) {slideIndex = x.length}
  for (i = 0; i < x.length; i++) {
     x[i].style.display = "none";  
  }
  x[slideIndex-1].style.display = "block";  
}
});

Can someone help me out please?

Answers: