$.cookie is not a function from form.js with block cache
This happens sometimes as $.cookie function is not supported. In those case you can try following approach.
Place this code in your JavaScript file
function setCookie(cname, cvalue, exdays) {
  var d = new Date();
  d.setTime(d.getTime() + (exdays*24*60*60*1000));
  var expires = &quot;expires=&quot;+ d.toUTCString();
  document.cookie = cname + &quot;=&quot; + cvalue + &quot;;&quot; + expires + &quot;;path=/&quot;;
}

function getCookie(cname) {
  var name = cname + &quot;=&quot;;
  var decodedCookie = decodeURIComponent(document.cookie);
  var ca = decodedCookie.split(';');
  for (var i = 0; i var c = ca[i];
  while (c.charAt(0) == ' ') {
    c = c.substring(1);
  }
  if (c.indexOf(name) == 0) {
    return c.substring(name.length, c.length);
  }
}
return &quot;&quot;;
}

Then you can use, setCookie(cname, cvalue, exdays) and getCookie(cname) to use set and get cookie functionalities instead of $.cookie.
Hope this works.