New answers tagged

0

Ummm. PHP code inside a module has no access to nor knowledge of the markup that will eventually be wrapped around it. There's no telling what chrome a template override may put in place, and the module actually gets rendered before it does, so at the time the module PHP gets executed, the markup wrapping the module has yet to be determined. I can't imagine ...


1

Try this workaround below, by calling jquery.framework from the article. It should override jquery.framework call that comes from your template so then jquery will be called before your script. {source} <?php JHtml::_('jquery.framework'); $doc = JFactory::getDocument(); $doc->addStyleSheet('mycode/css/article_1.css'); $doc->...


1

It’s a jQuery conflict (more like noConflict issue). You should start and wrap your script for example like: jQuery.noConflict(); (function( $ ) { // if you want to use $ $(function() { // More code using $ as alias to jQuery }); })(jQuery); Or redefine jQuery like: var $j = jQuery.noConflict(); // $j is now an alias to the jQuery function; ...


Top 50 recent answers are included