Tagged: x
-
AuthorPosts
-
March 2, 2017 at 9:06 am #1391933
keith sParticipantI cannot get the _blank target to work on this site. Below is a link of the site having this issue as well as a sample of the code.
http://edgertonksdev.org/city-council/city-council-agendas-and-minutes/ *Once on the page drop the accordion 2017 Agendas and Minutes and click on a live link.
http://edgertonksdev.org/resident-resources/public-safety-and-community-partners/ *This page has third party links to websites. Click to see the same issue.
Thank you.
March 2, 2017 at 9:07 am #1391937
keith sParticipantThis reply has been marked as private.March 2, 2017 at 11:09 am #1392100
Nabeel AModeratorHi there,
Thanks for writing in! It looks like target is not supported in accordion element. However you can do this with custom script, instead of target=”_blank” use class=”_blank” for example:
<div class="x-column x-sm x-1-5"><a href="/wp-content/uploads/Council-Agenda-01-12-2017.pdf" class="_blank">Agenda</a></div>Do this for every item you need to open in new window, then add the following jQuery script in your Customizer via Appearance > Customize > Custom > Edit Global Javascript
jQuery(document).ready(function($){ $('._blank').attr('target', '_blank'); });Don’t forget to clear your browser’s cache after adding the code. Let us know how this goes!
March 7, 2017 at 10:44 am #1397930
keith sParticipantThis worked awesome for the accordion targets. Now the target=_blank on menu items no longer works. What did I do wrong?
Visit this page – http://edgertonksdev.org/city-council/ and select Public Hearing Notices in the left hand menu. It is set to open in a new window but will not. I think this was an issue prior to implementing the solution you suggested.
Thank you for your assistance.
March 7, 2017 at 12:58 pm #1398126
RupokMemberHi there,
It supposed to work but as you are using within Widget, I guess that’s why it’s not working as expected. You can do the same as the suggestion. Like adding the custom class to the menu – http://prntscr.com/eh7hig
In that case the JS code would be like :
jQuery(document).ready(function($){ $('.open_blank a').attr('target', '_blank'); });Cheers!
-
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-1391933 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>
