I have a script that works well on the page. when I connect it via iframe, jQuery functions do not work, but everything is written out the usual script.
$.noConflict ();
does not help
I have a script that works well on the page. when I connect it via iframe, jQuery functions do not work, but everything is written out the usual script.
$.noConflict ();
does not help
Unsure entirely what you mean by 'jQuery functions do not work'.
If you mean that you cannot access the elements inside the iframe using jQuery, you should be able to access them using the contents()
method, see this answer
If the iframe comes from another domain, the browser will restrict script access to the contents based on the browser's same-origin policy, although you may still be able to access the content using postMessage
, see this answer about that
Thank you for helping some of the links led me to the right answer. had iframe prescribe ID and using $ ( "iframe"). load (function (e) {} solve the problem. However, remained one more thing that I can improve. I at still function onWheel (e) {} and I can not rewrite it so that it worked ...
function onWheel(e) { // podia na skroll
e = e || window.event;
delta = e.deltaY || e.detail || e.wheelDelta;
var info = $('#delta');
info.innerHTML = +info.innerHTML + (delta * (-1));
e.preventDefault ? e.preventDefault() : (e.returnValue = false);
sliderValue = parseInt($("#delta").html());
$("#amount").val(sliderValue);
calculationScale();
repaintingSlider();
}