This is because, according to MDN, disabled is a property of the HTMLLinkElement DOM object, but not an attribute of the link HTML element.
#TEMP DISABLE LINK CSS JQUERY CODE#
attr, the code will work in some browsers, but not Firefox. If in doubt use the Web Developer Toolbar in Firefox and select View Generated Source and you will see the source code with all changes applied by the javascript. These changes will be applied to the DOM so when you are looking at the source of the page you might not see them, it depends on the browser. " and ' can be interchanged but i prefer to use " for normal HTML declarations. These scripts will not run unless they are run after the page has loaded the JQuery library. JQuery SolutionĪlthough these are all written for CSS, the commands should work for Javascript script calls.
If using jQuery you must run the script after you load the jQuery library.
When working with jQuery in Joomla you must use jQuery() instead of $()ĭepending on what type of scripting language you use, Javascript/JQuery, to unload the CSS or JS there are different ways of referencing the elements.I could not get my script to work withou the slash at the begining. all file paths except when you are using just the filename. Make sure there is a slash at the beginning of a href statement when using a file path, i.e.
#TEMP DISABLE LINK CSS JQUERY FULL#
Use the full filepath to the file when using href.To unload CSS is simpler than JS because for JS it depends on whether the JS has been triggered and if it has already altered the DOM with it' payload, because once the DOM is altered, disabling the JS might not return the DOM it to it's original state, if that is not a problem do not worry. There are several ways to unload CSS and JS scripts that have already been applied by using Javascript or JQuery. Solution 2 (less work)Ĭhanging the order of the rendered css files to lower the weight of jQuery UI theme.css (if not already) and to provide info about the styles which need to be overriden in the user theme to turn it back to the theme look and feel. Drupal provides functions to remove css from header under certain circumstances.
JQuery UI comes with theme.css in /core/assets/vendor/jquery.ui/themes/base/theme.css overriding the original theme styles in Block Tabs.Ģ (or 3) possible solutions can solve this issue: Solution 1 (more work)Īn option in the Block Tabs block settings for each block individually to disable the jQuery UI css.