Custom js is in comment

Hi,
I would like to add a new javascript, but in the front, it is added in comment as below
--------------------
<script id="mfn-dnmc-custom-js">
//<![CDATA[
var elementPosition = $('.bg-fix').offset();

$(window).scroll(function(){
        if($(window).scrollTop() > elementPosition.top){
              $('.bg-fix').css('position','fixed').css('top','0');
        } else {
            $('.bg-fix').css('position','static');
        }   
});
//]]>
</script>
-----------

An idea to activate it ?

thanks.
Regards

Comments

Sign In or Register to comment.