Reputation: 1
attemping to run a jQuery statement with in Joomla 3.2 and getting an undefined property which references the _basepath line
within the index.php file I have the following code between the head statements
JHtml::_('jquery.framework', true, true);
/* a js file created to override the inline style */
JHtml::_('script',$this->_basePath.'js/override.js', false, true, false, false);
within the template folder in js/ I have a js doc called override.js with only the following code
jQuery('#sp-feature-wrapper').css(background', '');
Thanks for any assistance.
Upvotes: 0
Views: 149
Reputation: 19733
Try using $this->baseurl
and $this->template
, like so:
JHtml::_('script', $this->baseurl . '/templates/' . $this->template . '/js/override.js');
Try also wrapping your jQuery code in document ready as shown below:
jQuery(document).ready(function(){
jQuery('#sp-feature-wrapper').css('background', '');
});
Note that you also missed out a '
before background
in your code which I've added in for you.
Upvotes: 1