// mouseenter and mouseleave example

  // var index = 0;
  // var hovEnter;
  // var hovLeave;
  // $( ".tiles" )
  // .mouseenter(function() {
  //   $(".tile-wrapper").removeClass(hovLeave,1500,"easeInOut");
  //   index = $(this).attr("index");
  //   hovEnter = "hover-"+index;
  //   hovLeave = hovEnter;
  //   $(".tile-wrapper").addClass(hovEnter,1500,"easeInOut");
  // });

  var imgArr = ['http://bit.ly/2cCQ2VK','http://bit.ly/2decFOU','http://bit.ly/2d2oO6c','http://bit.ly/2cCPdMK',
  'http://bit.ly/2cCQeEz','http://bit.ly/2d2nKiS','http://bit.ly/2cYFpMe','http://bit.ly/2cL0QNn',
  'http://bit.ly/2cCPJdm','http://bit.ly/2d5V8JW','http://bit.ly/2cX6SuM','http://bit.ly/2cKLTfS',];

// jquery only example

$(".tiles")
  .mouseenter(function() {
    index = $(this).attr("index");
    var image = '../images/'+index+'.jpg';
    // $(".tile-wrapper").css('background-image','url('+image+')');
    $(".tile-wrapper").css('background-image','url('+imgArr[--index]+')');
  });


// javascript only example


// function imgChange(index){
//     // var image = '../images/'+index+'.jpg';
//     // wrap.style.backgroundImage = "url("+image+")";
//     wrap.style.backgroundImage = "url("+imgArr[--index]+")";
// }
// for(i=0;i<12;i++){
//   var tile = document.getElementsByClassName("tiles")[i];
//   var wrap = document.getElementById('tile-wrapper');
//   tile.onmouseover = function() {
//     var index = this.getAttribute('index');
//     imgChange(index);
//   };
// }

@@ -1,40 +1,82 @@
 // 
-mouseenter and mouseleave example
+using css files and jquery. files can be local or URL based writted in css.
 %0A%0A  
@@ -419,16 +419,39 @@
 // %7D);%0A%0A
+// array of image URLs%0A
   var im
@@ -903,16 +903,47 @@
 ;%0A    //
+ use local files for images%0A   
  $(%22.til
@@ -995,24 +995,59 @@
 ge+')');%0A   
+ // Use cdn based from array%0A    //
  $(%22.tile-wr
@@ -1142,17 +1142,16 @@
 xample%0A%0A
-%0A
 // funct
@@ -1175,22 +1175,49 @@
 ex)%7B%0A// 
+use local files for images%0A//
     
-//
  var ima
@@ -1254,19 +1254,16 @@
 ;%0A//    
- //
  wrap.st
@@ -1302,16 +1302,44 @@
 ge+%22)%22;%0A
+// Use cdn based from array%0A
 //     w

Update script.js