Jump to content

Why distance between link and grid of images is decreased by any click ?


Recommended Posts


With jquery I have “Load more” link which  is implemented with code like :

                <div id="div_nominated_photos_container"
                     style="margin: 10px !important; WWborder: 3px dotted red !important; ">

                <div style="margin: 10px !important; " id="div_add_new_photos">
                    <a onclick="javascript:loadNominatedPhotos(true)" class="nomination-new__btn-more "
                       style="cursor: pointer;">
                        <svg class="nomination-new__arr-down">
                            <use xlink:href="/img/sprite.svg#arr-down"></use>
                        Ещё фото

    function loadNominatedPhotos(load_next_page) {
        if (load_next_page) {

        var current_nomination_id = <?php echo e($currentNomination->id ?? ''); ?>

            type: "GET",
            dataType: "json",
            url: '/get_nominated_photos/' + current_nomination_id + "/" + current_page, //     public function get_nominated_photos($nomination_id, $current_page= 1)

            success: function (response) {
                if (current_page === 1) {
                if (current_page > 1) {

                if (response.rows_uploaded_count >= response.nominated_photos_total_count) {
                    $("#div_add_new_photos").css('display', 'none');
                } else {

                    $("#div_add_new_photos").css('display', 'block');
                    //  $($(".para")[1]).css({"color":"yellow"});
                    $("#div_add_new_photos").css('margin-top', '10px !important;'); //padding-top: 10px !important;

            error: function (error) {



adding more content work ok. but I have a problem
that clicking on “Ещё фото” link  distance between this link and grid of images is decreased by any click :

Live at:
Live link

When 15 rows are loaded then on “Ещё фото” link is hidden at all, as all data are retrieved.

I tried to set margins in content div design or programatically but failed.

How that can be fixed ?


Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.