- Details
- Written by: Stanko Milosev
- Category: Joomla
- Hits: 904
<script type="text/javascript" src="syntaxhighlighter/syntaxhighlighter.js"></script> <link rel="stylesheet" href="syntaxhighlighter/theme.css">My head block now looks like:
<head> <jdoc:include type="metas" /> <jdoc:include type="styles" /> <jdoc:include type="scripts" /> <script type="text/javascript" src="syntaxhighlighter/syntaxhighlighter.js"></script> <link rel="stylesheet" href="syntaxhighlighter/theme.css"> </head>
- Details
- Written by: Stanko Milosev
- Category: Joomla
- Hits: 2245
<a id="flights" href="http://milosev.com/2015-01-23-20-08-55/adventures-planning?id=119#flights">Flights:</a>POI: id="flights" When using internal link:
<a href="#flights">Flights:</a>Where anchor looks like:
<div id="flights">Flights:</div>
- Details
- Written by: Stanko Milosev
- Category: Joomla
- Hits: 5122
Small example how to include Google maps into Joomla!
HTML part is simple:
<div id="map-canvas" style="width: 400px; height: 400px"></div> <script src="https://maps.googleapis.com/maps/api/js"></script>
Note here that I had to add width and height, otherwise maps refuses to show. Also, note that I added Google APIs.
JS:
/*global google*/ (function (){ "use strict"; var mapOptions, mapCanvas, map; mapOptions = { zoom: 6, center: { lat: -34.397, lng: 150.644}, mapTypeId: google.maps.MapTypeId.ROADMAP }; mapCanvas = document.getElementById('map-canvas'); if (!map) { map = new google.maps.Map(mapCanvas, mapOptions); } }());Live example:
- Details
- Written by: Stanko Milosev
- Category: Joomla
- Hits: 5372
First disable editor: System -> Global configuration -> Default Editor: Editor - None -> Save
Then when you upload some script, or jquery file, in my case you can use it like this:
<script type="text/javascript" src="http://www.milosev.com/Download/dontLooseFocus/jquery-2.1.3.js"></script>
But when you use jQuery in your article, then you have to use jQuery instead of "$", for example:
jQuery("#myText").val("");