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)
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'); |
1 2 3 |
$(document).ready(function() { alert(Drupal.settings.basePath); }); |
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!
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.
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.