0

I am building a website, which is having parallax effect,its almost done but i have an issue with that ,at a particular part I have some lengthy texts (hence scroll bar also present),now when i scroll the text ,the text scrolls as well as background also scrolls (which I don't want).I have tried putting things like position:fixed but it does not work.However I have observed that by disabling(not at all adding it in the index page) a particular .js (say custom.js) I achieve what I want.

My requirement is like when i hover upon the text area ,the background to be fixed(no scrolling) but text to be scrolling and when I come out of the text area,it should be like the previous case(background scrolling possible).Is it possible to disable a particular .js WRT mouse events.I have already tried a few online solutions on how to disable js and reload js but none works for me,am new to js does know much either .I have also read online that once js loads its effects cannot be removed(sticks to memory kind of thing),completely puzzled!

Any help

Nihar
  • 553
  • 1
  • 10
  • 29
  • Can you post a working example(code) of the problem you are having? – stackErr Apr 19 '14 at 04:56
  • stackErr its too big to put on i can give u my reference website which am using u can check this site http://www.69svp.in/ – Nihar Apr 19 '14 at 04:57
  • Have you seen this SO question? http://stackoverflow.com/questions/9425910/load-and-unload-javascript-at-runtime – bovino Marcelo Bezerra Apr 19 '14 at 04:59
  • moreover iam extremely sorry that i cannot even make a js fiddle out of it ,in the website i have given ,when we add some lengthy text ,the background and foreground move simultaneously ,hope it makes u understand the problem completely,in that website there is a file 69svp.js that is the file i want to disable – Nihar Apr 19 '14 at 05:00
  • @ Marcelo Bezerra ,but i have already tried those solution it dint worked – Nihar Apr 19 '14 at 05:02

1 Answers1

0

HERE is a SOLUTION

If you want to stop a script you can wrap your <script> tag by <noscript> tag using jquery wrap() function.

Here is an Example. with scroll example too.

Sandy
  • 663
  • 1
  • 4
  • 9