Hi,
How can I target multiple scenes with this code, without having to duplicate the whole lot?
$(document).on(‘knack-scene-render.scene_450’, function(event, scene) {
$(“.kn-info-bar”).hide();
})
Cheers
Hi,
How can I target multiple scenes with this code, without having to duplicate the whole lot?
$(document).on(‘knack-scene-render.scene_450’, function(event, scene) {
$(“.kn-info-bar”).hide();
})
Cheers
@Craig_Anderson, sent on the move so hope this works!:
const scenesForCode = ['scene_1', 'scene_2', 'scene_3'];
$(document).on(‘knack-scene-render.any’, function(event, scene) {
if (scenesForCode.includes(scene.key)) {
// Insert code here
}
});
Perfect! Thanks for the quick reply Stephen.
wow, simple question but big impact! tks for asking it and much for the solution guys!!
very useful for me.