Skip to content

Commit

Permalink
Improve call masonry function
Browse files Browse the repository at this point in the history
  • Loading branch information
sonvnn committed Oct 29, 2024
1 parent 1581a1b commit 38486bb
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion framework/elements/articles/articles.php
Original file line number Diff line number Diff line change
Expand Up @@ -404,7 +404,7 @@
}

} elseif ($use_masonry) {
$document->loadMasonry('.as-masonry');
$document->loadMasonry('#'. $element->id .' .as-masonry');
}
if ($params->get('card_size', '') == 'custom') {
$card_padding = $params->get('card_padding', '');
Expand Down
2 changes: 1 addition & 1 deletion framework/elements/grid/grid.php
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@
}
echo '</div>';
if ($use_masonry) {
$document->loadMasonry('.as-masonry');
$document->loadMasonry('#'. $element->id .' .as-masonry');
}
$style->child('.astroid-icon')->addCss('font-size', $icon_size.'px');
if ($params->get('card_size', '') == 'custom') {
Expand Down
2 changes: 1 addition & 1 deletion framework/elements/imagegroup/imagegroup.php
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@
if ($enable_slider) {
$document->loadSlick('#'.$element->id.' .astroid-slick', implode(',', $slide_settings));
} elseif ($use_masonry) {
$document->loadMasonry('.as-masonry');
$document->loadMasonry('#'. $element->id .' .as-masonry');
}

if ($enable_image_cover) {
Expand Down
2 changes: 1 addition & 1 deletion framework/elements/testimonials/testimonials.php
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@
$wa->registerAndUseScript('slick.js', 'astroid/slick.min.js', ['relative' => true, 'version' => 'auto'], [], ['jquery']);
echo '<script type="text/javascript">jQuery(document).ready(function(){jQuery(\'#'.$element->id.' .astroid-slick\').slick({'.implode(',', $slide_settings).'})});</script>';
} elseif ($use_masonry) {
$document->loadMasonry('.as-masonry');
$document->loadMasonry('#'. $element->id .' .as-masonry');
}

if ($params->get('card_size', '') == 'custom') {
Expand Down

0 comments on commit 38486bb

Please sign in to comment.