2 yabba Nov 21, 2010 16:04

¥åßßå wrote:
class foo_Skin extends Skin{ function foo_Skin( $db_row = NULL, $skin_folder = NULL ) { parent::Skin( $db_row, $skin_folder ); if( param( 'ctrl', 'string' ) == 'coll_settings' && param( 'tab', 'string' ) == 'skin_settings' ) { require_js( 'whatever.js' ); } }
¥
great. just a note the tab will be "skin" instead of "skin_settings"
Note: Also need an "AdminEndHtmlBody" function like SkinEndHtmlBody to execute javascripts those have to be right before body.
Why? Just use jQuery( document ).ready( function(){}); ?
¥
¥åßßå wrote:
Why? Just use jQuery( document ).ready( function(){}); ?
¥
well i have but somehow it did not work unless after it's executed after the selector i want to manipulate
Then you have a flaw in your code as the above executes after all "html" is loaded
¥
¥åßßå wrote:
Then you have a flaw in your code as the above executes after all "html" is loaded
¥
may be.. i finally got it working after reviewing my code, but it's still weird that it worked until after putting it below
Glad you found the flaw ;)
¥
¥