Hi, I need to add custom CSS and JS declaration in an article. Tried this but it doesn’t load files:
$document = JFactory::getDocument(); $document->addStyleSheet("https://cdn.datatables.net/r/bs-3.3.5/jq-2.1.4,dt-1.10.8/datatables.min.css", "screen"); $document->addScript("https://cdn.datatables.net/v/bs/dt-1.10.16/datatables.js", 'text/javascript');
I am on latest version of Joomla
Hi nagpurwalas
You can add into the file: /templates/ja_simpli/index.php
Like this: https://prnt.sc/twvfiu
Thank you. I was looking to add only to a single article though. I got it working by adding both declarations in the article itself instead of adding to head tag and it’s working okay so far