Is it possible to make an onClick event that will work on every page’s background without having to go and define it individually on every page. I have the function setup in the site scripts not the page which works fine but it will only work on pages that I go and define the onClick event manually in that pages background properties.
-
put the onClick() function in the Site Code panel instead of the Page code panel.
-
Instead of using export function backgorund_click, write the following code:
$w.onReady(() => {
$w("#myPageBackgrondId").onClick(event => {
//your code
})
})
Thank you very much that certainly solved the issue.
@aarontharker1972 you’re welcome