-
AuthorPosts
-
March 31, 2016 at 10:06 pm #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.
March 31, 2016 at 10:13 pm #606278Hi,
Automatically close when user clicks outside the frame?
Regards,
JosueMarch 31, 2016 at 10:13 pm #606279Hi,
Automatically close when user clicks outside the frame?
Regards,
JosueMarch 31, 2016 at 10:19 pm #606283yes.
- This reply was modified 8 years, 7 months ago by tony0506.
March 31, 2016 at 10:41 pm #606300Hi,
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,
JosueMarch 31, 2016 at 11:14 pm #606323Did 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.
March 31, 2016 at 11:22 pm #606333Hi,
Can you please create me a WordPress administrator account? post it here as a private reply.
Regards,
JosueMarch 31, 2016 at 11:31 pm #606339Yes give me 30 mins.
April 1, 2016 at 12:08 am #606372Try this
- This reply was modified 8 years, 7 months ago by tony0506.
April 1, 2016 at 7:00 am #606508I 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.
April 1, 2016 at 7:42 am #606525Hey!
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.
April 4, 2016 at 9:36 pm #607876It 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.
April 5, 2016 at 4:32 am #608014After 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 -
AuthorPosts
- You must be logged in to reply to this topic.