Define clientlib(javascript file) which would define a function(javascript is all about functions) which would do the instructions you require to execute.
Run you function both in Author mode and Publisher mode.
Make sure you include your clientlib in both modes is added to your html.
Define clientlib(javascript file) which would define a function(javascript is all about functions) which would do the instructions you require to execute.
Run you function both in Author mode and Publisher mode.
Make sure you include your clientlib in both modes is added to your html.