add_js
Last updated
Last updated
ClipBucket has a very useful function that is used to add Js file in ClipBucjet template so that you dont need to add js file in each template seperately, all you have to do is to add a little code and your file will be included in all templates
usage
add_js(array[]);
explanation
array(âfileâ=>âscopeâ);
file
Make sure your file is placed in /js directory, e.g if you want to call my.js , you first place it in /js directory and then add array(âmy.jsâ=>âwatch_videoâ); , similarly if your file in /js/somefolder/myfile.js , you will add it array(âsomefolder/myfile.jsâ=>âwatch_videoâ);
scope
scope basically tells the clipbucket in which files we should include this file , ie , watch_video, home, view_channel etc⌠or say for each file_name.php scope name is file_name. ok , if you add
array(âmy.jsâ=>âwatch_videoâ); array(âmy.jsâ=>âview_channelâ); array(âmy.jsâ=>âview_groupâ);
it will include my.js file in all these âwatch_videoâ , âview_channelâ and âview_groupâ files.. if you want to add my.js in all files, simply, call function as follow
array(âmy.jsâ=>âglobalâ);
Loading...