Revision history [back]

click to hide/show revision 1
initial version

asked 2020-11-13 23:58:44 +0800

Victorsilveira1 gravatar image Victorsilveira1

Can't use a function from an external JavaScript file

Hello, i'm creating a zul file from an existing html file, in this html i use an external js file, with jquery to animate the pages. When I created the zul file, the function of controll the scrolling wasn't working so i tried to create another zul to test the function, but it doesn't work unless i don't use the xmlns="http://wwww3org/1999/xhtml" (i used the * because my karma is too low for links) namespace, how can i do it work?

Can't use a function from an external JavaScript file

Hello, i'm creating a zul file from an existing html file, in this html i use an external js file, with jquery to animate the pages. When I created the zul file, the function of controll the scrolling wasn't working so i tried to create another zul to test the function, but it doesn't work unless i don't use the xmlns="http://wwww3org/1999/xhtml" (i used the * because my karma is too low for links) namespace, how can i do it work?work? this is the js file:

scrollFunction = function(){ var scrollPos = 0; var Counter = 0; $(window).scroll(function(){ var scrollPosCur = $(this).scrollTop(); if (scrollPosCur > scrollPos) { Counter -= 1; } else { Counter += 1; } scrollPos = scrollPosCur; console.log(scrollPosCur); });

}

$(document).ready(scrollFunction);

Can't use a function from an external JavaScript file

Hello, i'm creating a zul file from an existing html file, in this html i use an external js file, with jquery to animate the pages. When I created the zul file, the function of controll the scrolling wasn't working so i tried to create another zul to test the function, but it doesn't work unless i don't use the xmlns="http://wwww3org/1999/xhtml" (i used the * because my karma is too low for links) namespace, how can i do it work? this is the js file:

scrollFunction = function(){
    var scrollPos = 0;
    var Counter = 0;
    $(window).scroll(function(){
        var scrollPosCur = $(this).scrollTop();
        if (scrollPosCur > scrollPos) {
            Counter -= 1;
        } else {
            Counter += 1;
        }
        scrollPos = scrollPosCur;
        console.log(scrollPosCur);
    });

}

$(document).ready(scrollFunction);

}); } $(document).ready(scrollFunction);

Can't use a function from an external JavaScript file

Hello, i'm creating a zul file from an existing html file, in this html i use an external js file, with jquery to animate the pages. When I created the zul file, the function of controll the scrolling wasn't working so i tried to create another zul to test the function, but it doesn't work unless i don't use the xmlns="http://wwww3org/1999/xhtml" xmlns="http://www.w3.org/1999/xhtml" (i used the * because my karma is too low for links) namespace, how can i do it work? this is the js file:

scrollFunction = function(){
    var scrollPos = 0;
    var Counter = 0;
    $(window).scroll(function(){
        var scrollPosCur = $(this).scrollTop();
        if (scrollPosCur > scrollPos) {
            Counter -= 1;
        } else {
            Counter += 1;
        }
        scrollPos = scrollPosCur;
        console.log(scrollPosCur);
    });

}

$(document).ready(scrollFunction);
Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More