Text Size
Tuesday, May 22, 2012
Get a look down
Joomla >> Displaying items by tag: javascript
Displaying items by tag: javascript

You can use this little snippet to scroll to the top of the page using javascript (in case you don't wan't to use html anchors)

1
2
3
<!-- The click on this link will take you to the top of the page -->
<!-- Place this link on the bottom of the page -->
<a href="#" onclick="window.scroll(); return false">Scroll to the top</a>
Published in Code snippets

Here's how you can make a string translatable in your javascript files loaded in Drupal.

1
2
3
4
5
6
7
8
// This little code will append a <div> to the body.
// The <div> contains a translatable string "Hello world!"
// You can translate this string easily in the Back office
// of your website by browsing this url : 
// http://you.website.here/admin/build/translate/search
// and search for Hello world!
// PS : it's a case sensitive input
$('<div>'+Drupal.t("Hello world!")+'</div>').appendTo('body');
Published in Code snippets
Here's a little code snippet that gives you the possibility to get the base path of your drupal sites in javascript :
1
2
3
$(document).ready(function() {
	alert(Drupal.settings.basePath);
});
Published in Code snippets

We gonna see in this article how it is easy to create our own simple accordion system using the Mootools library. Of course there are lot of Mootools plugins that allow us to create such system in our websites, but sometimes we need really a simple way to do the job, and in this case, this tutorial can make your life easier. So take your keyboards and let's do it!

Published in JavaScript
Monday, 16 August 2010 15:45

How to preload a page using mootools

Some web site contains a large number of images, scripts or stylesheets even after optimization of various pages. This slow loading, and the end user just does not perhaps understand that the page is being loaded when he sees everywhere broken divs, or images half loaded.

In this small article I will show you a trick that allows you to make a preloading image on your site, which will disappear once the page is loaded, using the Mootools framework.

Published in JavaScript

In this article I will present 10 essential features to use when developing a website with Joomla CMS, they can be a good source for a Joomla novice developer, which will enable him to know best practices to use in such project.

Take into consideration that these tips are tested in version 1.5 of Joomla, and can more or less do not work into the next version 1.6.

Published in Joomla
Usefull tricks