-
AuthorPosts
-
January 23, 2014 at 9:03 pm #214080
Hi Team Kriesi,
I have implemented the portfolio grid in my site with the ajax portfolio preview. So far – so good :-) … means on my site, if the user clicks on a portfolio image, a preview opens on the top of the grid where he can click on the arrow to jump to the the next preview. Is it possible to show the first portfolio item from the beginning – so that the portfolio preview is shown from the beginning without that the customer first has to click on an image…
Best regards,
SilberrotJanuary 23, 2014 at 11:51 pm #214177Hi,
Try adding this at the end of js/avia.js:
jQuery(function() { jQuery("a[data-rel='grid-1']").first().trigger("click") });
Regards,
JosueFebruary 1, 2014 at 4:55 pm #218264Hi Josue,
many thanks for your reply and sorry for my late response. Today I tried to find the js/avia.js … but didn’t found the file. I am searched my whole ftp server but didn’t find the file.
Best regards,
SilverrotFebruary 1, 2014 at 7:02 pm #218275Hi,
Can you post the link to your website please?
Regards,
JosueFebruary 2, 2014 at 2:12 pm #218407February 2, 2014 at 6:32 pm #218445Hey!
avia.js is right here:
http://web409.mis63.de/wp-content/themes/enfold/js/avia.js?ver=1Regards,
JosueAugust 1, 2014 at 6:35 pm #298883Hi Josue,
I am trying to do the same thing.
On Page Load show the First Portfolio Item OPEN with the Ajax Portfolio.
The Page is http://www.shflooring.co.uk/haro-laminate-flooring
I added:
jQuery(function() {
jQuery(“a[data-rel=’grid-1′]”).first().trigger(“click”)
});to the page enfold/js/avia.js
However it still doesn’t work.
Any ideas ?
Thanks
BenAugust 1, 2014 at 8:25 pm #298918I am also trying to show the ajax panel open on page load. Tried the above and it does not work.
Thanks!August 1, 2014 at 11:48 pm #298995Hi guys,
Try with this method instead, add the following at the very end of your theme / child theme functions.php file:
function add_custom_script(){ ?> <script> jQuery(window).load(function(){ jQuery("a[data-rel='grid-1']").first().trigger("click") }); </script> <?php } add_action('wp_footer', 'add_custom_script');
Regards,
JosueAugust 2, 2014 at 1:36 am #299015Hi Josue,
Great that worked, many thanks.
Is it also possible to stop the page auto-scrolling to the top of the ajax-portfolio on load.
See http://www.shflooring.co.uk/haro-laminate-flooring
Thanks
BenAugust 2, 2014 at 2:04 am #299030Hey Ben!
I couldn’t note the autoscrolling when i loaded the page, are you referring to the loading circle animation?
Best regards,
JosueAugust 2, 2014 at 2:10 am #299034Hi Josue,
Following on from previous, I commented out line 1340 in shortcodes.js
// $(‘html:not(:animated),body:not(:animated)’).animate({ scrollTop: target_offset }, options.timing, options.easing);
This works. Can you advise if this is the correct way to do it ? If not any other recommendations ?
Thanks
BenAugust 2, 2014 at 2:30 am #299043That’s OK but it will affect the normal behavior when you manually open a portfolio item.
August 2, 2014 at 2:52 am #299050Thank you!
If I have two different pages that use the ajax portfolio, it possible to set the behavior in one instance as the default (not open on page load) and in another instance with the new code, where it’s open on page load?
August 2, 2014 at 3:38 am #299060Hey Kristen!
Yeah, change the code this way:
function add_custom_script(){ if ( is_page( 2 ) ) { ?> <script> jQuery(window).load(function(){ jQuery("a[data-rel='grid-1']").first().trigger("click") }); </script> <?php } } add_action('wp_footer', 'add_custom_script');
“2” would be the Page ID where you want this portfolio mod to be applied.
Best regards,
JosueAugust 2, 2014 at 3:51 am #299062Awesome – Thanks so much!
August 2, 2014 at 4:01 am #299068You are welcome, glad i could help :)
Regards,
JosueAugust 25, 2014 at 5:37 pm #308911Josue – like icuk, I am trying to prevent the page from autoscrolling to the open portfoilio item. Can you advise how to remove the scroll, without affecting the normal behavior of the ajax portfolio?
August 25, 2014 at 8:38 pm #308970Hi!
I tried some thing but no avail, unfortunately it’s not that easy, try contacting a developer to modify the theme to your needs.
Regards,
Josue -
AuthorPosts
- The topic ‘Portfolio Grid – AJAX Portfolio Preview’ is closed to new replies.