[Solar-talk] using js
Jeff Surgeson
solar at 3hex.com
Mon Aug 27 01:51:57 CDT 2007
Have a question about using js code with Solar and better ways to do it.
I have never used js and know very little about it, like most things :-) but
wondered if the way I am using the code below is the correct way to use a
piece of js code in my solar project, or is there a better way to load/use
js? with helpers or the likes?
Solar Version:- svn
JS Code:- lightbox.js
A javscript script to overlay images on the current window using prototype.js,
scriptactulous.js, effects.js
In my Vendor_App_Base.php I include the js library's as well as associated css
file.
public $layout_head = array(
'style' => array(
'Bulldog/styles/lightbox/lightbox.css',
),
'script' => array(
'Solar/scripts/prototype/prototype.js',
'Solar/scripts/scriptaculous/scriptaculous.js?load=effects',
'Bulldog/scripts/lightbox/lightbox.js',
),
);
I suppose I should only be including the scripts in the class that is using
them as apposed to the base class, or does it matter, other than a slight
increase in file size it should make no difference?
Are there any performance issues with using 3rd party js with Solar?
I have always avoided using js but some things you just cant achieve as easily
as with js.
--
...........::::::...........
Jeff Surgeson / South Africa
More information about the Solar-talk
mailing list