w3tweaks.com
  • Effects
    • Scroll Effects
    • Text Effects
    • Shadow
  • Essentials
    • Arrows
    • Buttons
    • Background Patterns
    • Border Examples
    • Cards
    • Color Palettes
    • Dividers
    • Link styles
    • Loaders
    • Modal Windows
    • Notifications
    • Progress bar
    • Quote styles
    • Spinner
    • Tooltips
  • Media
    • Calendars
    • Carousels
    • Clocks
    • Gallery
    • Music Players
    • Sliders
    • Slideshows
    • Tables
    • Thumbnails
  • Navigation
  • Inputs
    • Range Sliders
    • Checkboxes
    • Toggle Switches
  • Scripts
    • Angularjs
    • Backbone.js
    • bootstrap
    • jQuery
    • ReactJs
    • JavaScript
    • Syntax Highlighters
    • tryit editor
    • PHP
  • API’s
    • Facebook
    • Google
    • Indeed
    • Twitter
    • YouTube
  • Tools
w3tweaks.com
  • Effects
    • Scroll Effects
    • Text Effects
    • Shadow
  • Essentials
    • Arrows
    • Buttons
    • Background Patterns
    • Border Examples
    • Cards
    • Color Palettes
    • Dividers
    • Link styles
    • Loaders
    • Modal Windows
    • Notifications
    • Progress bar
    • Quote styles
    • Spinner
    • Tooltips
  • Media
    • Calendars
    • Carousels
    • Clocks
    • Gallery
    • Music Players
    • Sliders
    • Slideshows
    • Tables
    • Thumbnails
  • Navigation
  • Inputs
    • Range Sliders
    • Checkboxes
    • Toggle Switches
  • Scripts
    • Angularjs
    • Backbone.js
    • bootstrap
    • jQuery
    • ReactJs
    • JavaScript
    • Syntax Highlighters
    • tryit editor
    • PHP
  • API’s
    • Facebook
    • Google
    • Indeed
    • Twitter
    • YouTube
  • Tools
w3tweaks.com
Home CMS

Add custom attribute in Joomla 3.x addScript

W3TWEAKS by W3TWEAKS
August 16, 2019
in CMS

This tutorial will explain you, how add custom attributes in Joomla 3.x addScript()

You might also like

PHP Content Management Systems

8 PHP Content Management Systems (CMS)

May 9, 2020
How to import joomla modules inside any custom components

How to import joomla modules inside any custom components

August 16, 2019

Find the code below

$doc = JFactory::getDocument(); 
$doc->addScript(JURI::root(true) . '/libraries/gantry/libs/google-code-prettify/prettify.js', array(), array('data-cfasync' => 'false'));

Find the detailed explanation about the above code.

Before calling addScript() have to call JFactory::getDocument() like below.

$doc = JFactory::getDocument();

$doc->addScript(url, version, attributes); addScript has three parameters 1st url, 2nd Version and 3rd attributes.

Find the demo image below

joomla add custom attributes in addscript
Demo Image: joomla add custom attributes in addscript
Tags: customdemoJoomlatutorial
Previous Post

33 CSS transition tricks and effects examples

Next Post

19 Handy Credit Card UI/UX for Web Designers

W3TWEAKS

W3TWEAKS

Since I've had a strong background in front-end development, I took the initiative to start my own website (w3tweaks.com) to share my knowledge with the world.

Related Stories

PHP Content Management Systems

8 PHP Content Management Systems (CMS)

by W3TWEAKS
May 9, 2020

Find the collection of PHP Content Management Systems. Back Drop CMS The free and Open Source CMS that helps you...

How to import joomla modules inside any custom components

How to import joomla modules inside any custom components

by W3TWEAKS
August 16, 2019

This tutorial will explain how to import joomla modules inside custom components like plugin, module or components. In this tutorial...

Joomla 3 – Page Navigation With Titles

Joomla 3 – Page Navigation With Titles

by W3TWEAKS
August 16, 2019

In this tutorial you will learn how to set the article title for page navigation buttons You will be seeing...

Joomla 3 – Refresh Manifest Cache failed: Extension is not currently installed

Joomla 3 – Refresh Manifest Cache failed: Extension is not currently installed

by W3TWEAKS
August 16, 2019

In this tutorial we will show you how to fix the "Refresh Manifest Cache failed" error in Joomla! You may...

Next Post
19 Handy Credit Card UI/UX for Web Designers

19 Handy Credit Card UI/UX for Web Designers

Discussion about this post

Popular Posts

100 Creative CSS Cards

41 Multi step HTML forms

13 Free HTML & CSS Dashboard Template Designs

20 HTML & CSS pricing tables

49 CSS Tables

14 Best CSS Dark Mode

11 CSS Shopping Cart UI/UX

42 Cool CSS Avatars For Better UI

89 Best CSS Toggle Switches

55 Useful handpicked CSS Buttons with examples and demos

w3tweaks

We bring you the best frontend collections that will fix perfect for news, magazine, personal blog, etc. Check our landing page for details.

  • Effects
    • Scroll Effects
    • Text Effects
    • Shadow
  • Essentials
    • Arrows
    • Buttons
    • Background Patterns
    • Border Examples
    • Cards
    • Color Palettes
    • Dividers
    • Link styles
    • Loaders
    • Modal Windows
    • Notifications
    • Progress bar
    • Quote styles
    • Spinner
    • Tooltips
  • Media
    • Calendars
    • Carousels
    • Clocks
    • Gallery
    • Music Players
    • Sliders
    • Slideshows
    • Tables
    • Thumbnails
  • Navigation
  • Inputs
    • Range Sliders
    • Checkboxes
    • Toggle Switches
  • Scripts
    • Angularjs
    • Backbone.js
    • bootstrap
    • jQuery
    • ReactJs
    • JavaScript
    • Syntax Highlighters
    • tryit editor
    • PHP
  • API’s
    • Facebook
    • Google
    • Indeed
    • Twitter
    • YouTube
  • Tools