Viewing 13 posts - 1 through 13 (of 13 total)
  • Author
    Posts
  • #606273

    Can you tell me how I can make the “PROJECT GALLERY” windows automatically close just like you do with the images? I don’t want it to close with just the “X” button. It’s an AJAX window.

    Thanks,
    Tony

    • This topic was modified 8 years, 7 months ago by tony0506.
    #606278

    Hi,

    Automatically close when user clicks outside the frame?

    Regards,
    Josue

    #606279

    Hi,

    Automatically close when user clicks outside the frame?

    Regards,
    Josue

    #606283

    yes.

    • This reply was modified 8 years, 7 months ago by tony0506.
    #606300

    Hi,

    Try adding this at the very end of your theme / child theme functions.php file:

    function add_custom_script(){
    ?>
    <script>
    (function($){
        $(window).load(function() {
        	$('.container_wrap_first').on('click', function(){ $('.avia_close').trigger('click'); });
        });
    })(jQuery);
    </script>
    <?php
    }
    add_action('wp_footer', 'add_custom_script');

    Regards,
    Josue

    #606323

    Did you try the code you gave me and apply it to the 3 COLUMN AJAX PORTFOLIO page? Because now the AJAX page doesn’t load. I tried it on you DEMO and not the page I sent you earlier.

    • This reply was modified 8 years, 7 months ago by tony0506.
    #606333

    Hi,

    Can you please create me a WordPress administrator account? post it here as a private reply.

    Regards,
    Josue

    #606339

    Yes give me 30 mins.

    #606372

    Try this

    • This reply was modified 8 years, 7 months ago by tony0506.
    #606508

    I figured out what was wrong. You need to add a tabindex=”-1″ to the element. Like so:
    <div class=’main_color container_wrap_first container_wrap fullsize’ tabindex=’-1′>

    My only question now is how do I manipulate your code to place the “tabindex=’-1′ on your source code”? I was able to test out my findings just by simply viewing and saving the source code.

    #606525

    Hey!

    We are working on your ticket please wait while we update the results here soon. I think the user you have created has some permission issue as we are not able to create any new pages or add the code.

    Anyways to close an ajax portfolio item when you click outside the portfolio item please use the below code in functions.php and use the portfolio items as usual this will work…

    
    //closeAjaxPortfolio
     
    function closeAjaxPortfolio(){
    ?>
    <script>
         
        jQuery(document).on('click', function(event) {
            if (!jQuery(event.target).closest('.isotope-item').length) {
                jQuery('.avia_close').trigger('click'); 
            }
        });
     
    </script>
    <?php
    }
    add_action('wp_head', 'closeAjaxPortfolio');

    Cheers!
    Vinay

    • This reply was modified 8 years, 7 months ago by Vinay.
    #607876

    It works but not perfectly. Here’s the problem. I have 2 gallery windows (can possibly be more). As you can see I have 2 galleries near the bottom (see private link). The problem is when you activate the script by clicking on one of the gallery images in the bottom 2 galleries – it fails to open again.

    It also closes all of the ajax windows when you have every gallery window open (PROJECT GALLERY & LOGO WALL). I want the window that is closes to the cursor to close if you are near one of the ajax boxes.

    #608014

    After looking again at this i’m afraid it would require an extensive modification to the theme, unfortunately that’s beyond our support scope. You can request a customisation quote from a third-party provider here.

    Regards,
    Josue

Viewing 13 posts - 1 through 13 (of 13 total)
  • You must be logged in to reply to this topic.