when I want to go onclick to next page's specific div it shows this error .
jquery.js:3123 Uncaught DOMException: Failed to read the 'contentDocument' property from 'HTMLIFrameElement': Blocked a frame with origin from accessing a cross-origin frame.
and not going on specific div just on page.
EDIT
<div class="col-sm-12 main-image"><img onclick="document.location='/discovers/styles-services#cat_eye';" src="pub/media/before-after/No/Back.jpg" /></div>
Best Answer
This will likely be down to either trying to access an iFrame with Javascript, or you're trying to load an asset from a different server? I can't quite tell from your question sorry, it's not very clear.
Answer taken from this stack exchange post