-
AuthorPosts
-
December 26, 2015 at 3:32 pm #721588
(function($){ $('.x-recent-posts a').on('click touchstart', function(){ return false; }); })(jQuery);
This javascript code also disables the ability to scroll when on a mobile device. Is there any other way to achieve this without breaking touch ability?
December 26, 2015 at 7:20 pm #721743Hi there,
Please try this one,
jQuery('.x-recent-posts a').off('click touchstart');
Removing the binding is easier than disabling it. Because it may also disable the event chains that also triggers the scroll.
Cheers!
December 26, 2015 at 9:27 pm #721811That does allow touch to work now, however the page jumps to the top when clicked or tapped.
Any other help appreciated.
Thanks
December 26, 2015 at 10:22 pm #721842Hi there,
Please try this one 🙂
jQuery('.x-recent-posts a').off('click touchstart touchend').on('click', function(e){ e.preventDefault(); });
I think, that should do it.
Cheers!
December 26, 2015 at 10:34 pm #721850Thanks for your help, however that did not fix the problem.
Regards,
December 26, 2015 at 10:41 pm #721856Hi there,
In that case, please provide your site’s URL and the area where the issue is occurring.
Thanks!
December 26, 2015 at 11:13 pm #721869This reply has been marked as private.December 26, 2015 at 11:41 pm #721882Hello There,
Thanks for providing the login information. Please try to use this method instead. Simply edit your page and in the settings tab, Settings > Custom CSS, please insert the following css
.x-recent-posts a { pointer-events: none; }
If this works out, you may need to remove the JS code we gave in our previous reply.
We would loved to know if this has work for you. Thank you.December 26, 2015 at 11:49 pm #721888Thank works! Thank you so much!
If you ever feel like letting me know how to make it now accept the html from the post (instead of just the text) I would be very grateful.
December 26, 2015 at 11:58 pm #721892Hi there,
You’re welcome.
Are you referring to your other thread? https://community.theme.co/forums/topic/show-full-post-content-in-cornerstone-recent-posts-element/
Have you tried that? If yes, please let us know how it goes.
Allowing HTML requires removal of your recent posts link wrapper.
Thanks.
-
AuthorPosts