Joomla JQuery 1.6.1. Plug-in Question/Problem
Joomla JQuery 1.6.1. Plug-in Question/Problem
I am fairly new to Joomla, and have created a custom template for a client, and am wondering, after installing the 1.6.1 Plug-in from the extensions manager (it installed correctly and I published/activated it), if I put the PHP code into the header of my custom template's PHP file?
JPluginHelper::importPlugin( 'corejoomla' );
$dispatcher =& JDispatcher::getInstance();
$dispatcher->trigger('onCallIncludeJQuery', array($params));
I am trying to enable a JS in my header that will set my CSS columns vertically to equal lengths when one is longer than the other due to more content being in one over the other.
<script>
$(function() {
var tallest = 0;
var $columnsToEqualize = $(".column");
$columnsToEqualize.each(function() {
var thisHeight = $(this).height();
if (thisHeight > tallest) {
tallest = thisHeight;
}
});
$columnsToEqualize.height(tallest);
});
</script>
--------
I thought this might be a good/quick/clean solution. I put the script into the head of both my index.html and index.php documents, but the php code only in my index.php file - is this correct? (I am also only somewhat familiar with PHP). I've used JQuery successfully many times outside of Joomla, so this is frustrating.
Thank you in advance. Our University will likely use this plug-in quite a bit if I can figure out how to call it and get scripts working - or does JQuery only work in Joomla with customzied extensions?
Thank you.
JPluginHelper::importPlugin( 'corejoomla' );
$dispatcher =& JDispatcher::getInstance();
$dispatcher->trigger('onCallIncludeJQuery', array($params));
I am trying to enable a JS in my header that will set my CSS columns vertically to equal lengths when one is longer than the other due to more content being in one over the other.
<script>
$(function() {
var tallest = 0;
var $columnsToEqualize = $(".column");
$columnsToEqualize.each(function() {
var thisHeight = $(this).height();
if (thisHeight > tallest) {
tallest = thisHeight;
}
});
$columnsToEqualize.height(tallest);
});
</script>
--------
I thought this might be a good/quick/clean solution. I put the script into the head of both my index.html and index.php documents, but the php code only in my index.php file - is this correct? (I am also only somewhat familiar with PHP). I've used JQuery successfully many times outside of Joomla, so this is frustrating.
Thank you in advance. Our University will likely use this plug-in quite a bit if I can figure out how to call it and get scripts working - or does JQuery only work in Joomla with customzied extensions?
Thank you.
Access to viewing replies is restricted.
Showing 8 of 8 replies
You do not have permissions for replying to this topic.