Skip to content

Commit

Permalink
Fix some issues in Joomla 3.x
Browse files Browse the repository at this point in the history
  • Loading branch information
wilsonge committed Jul 9, 2013
1 parent 1ac8717 commit 2a5fef7
Showing 1 changed file with 26 additions and 22 deletions.
48 changes: 26 additions & 22 deletions mod_social_slider/mod_social_slider.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@

$document = JFactory::getDocument();


if($params->get('jquery_css') == 0){
if(version_compare(JVERSION,'3.0.0','ge')) {
JHtml::_('jquery.framework');
Expand Down Expand Up @@ -53,18 +52,21 @@
if ($params->get('position') == "left") {
if($params->get('jquery_css') == 0){
$js_left = '
$(function() {
$("#jj_sl_navigation a").css("marginLeft", "-140px")
$("#jj_sl_navigation > li").hover(
function () {
$("a",$(this)).stop().animate({"marginLeft":"-2px"},200);
},
function () {
$("a",$(this)).stop().animate({"marginLeft":"-140px"},200);
}
);
});
(function($){
$(function() {
$("#jj_sl_navigation a").css("marginLeft", "-140px")
$("#jj_sl_navigation > li").hover(
function () {
$("a",$(this)).stop().animate({"marginLeft":"-2px"},200);
},
function () {
$("a",$(this)).stop().animate({"marginLeft":"-140px"},200);
}
);
});
})(jQuery);
';
$css = '';
$document->addScriptDeclaration($js_left);
}
if($params->get('jquery_css') == 1){
Expand Down Expand Up @@ -173,17 +175,19 @@ function () {
else if ($params->get('position') == "right") {
if($params->get('jquery_css') == 0){
$js_right = '
(function($){
$(function() {
$("#jj_sl_navigation a").css("marginLeft", "140px")
$("#jj_sl_navigation > li").hover(
function () {
$("a",$(this)).stop().animate({"marginLeft":"2px"},200);
},
function () {
$("a",$(this)).stop().animate({"marginLeft":"140px"},200);
}
);
});
$("#jj_sl_navigation a").css("marginLeft", "140px")
$("#jj_sl_navigation > li").hover(
function () {
$("a",$(this)).stop().animate({"marginLeft":"2px"},200);
},
function () {
$("a",$(this)).stop().animate({"marginLeft":"140px"},200);
}
);
});
})(jQuery);
';
$css = 'ul#jj_sl_navigation li {left: 140px;position: relative;}';
$document->addScriptDeclaration($js_right);
Expand Down

0 comments on commit 2a5fef7

Please sign in to comment.