Load jQuery in custom Joomla extensions

<?php // load jQuery JLoader::import( 'joomla.version' ); $version = new JVersion(); if (version_compare( $version->RELEASE, '2.5', '<=')): // version 2.5.x if(JFactory::getApplication()->get('jquery') !== true): // load jQuery here JFactory::getApplication()->set('jquery', true); endif; else: // version 3.x and higher JHtml::_('jquery.framework'); endif; ?>

Be the first to comment

You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.