- Posts: 2
- Thank you received: 0
Tab links to articles
-
fitzbeck
Inactive member - Topic Author
- New Member
Less
More
11 years 6 months ago #29971
by fitzbeck
Tab links to articles was created by fitzbeck
Hi There, my users are clicking on the tabs and expecting to go directly to that article, rather than having the tabs load the image/text and then having to click the image/text link ...
Is it possible to set the tab link to load the article (or read more link) rather than load the rotating image/text ...
I tried to change the tmpl.php file with:
with
which failed.
Any pointers would be awesome. Many thanks
Is it possible to set the tab link to load the article (or read more link) rather than load the rotating image/text ...
I tried to change the tmpl.php file with:
Code:
<a href="#fragment-<?php echo $loop; ?>">
with
Code:
<a href="<?php echo $link[$loop]; ?>"
which failed.
Any pointers would be awesome. Many thanks
Please Log in to join the conversation.
-
ivan.milic
Support Staff - Moderator
Less
More
- Posts: 14116
- Thank you received: 1639
11 years 6 months ago #29981
by ivan.milic
Replied by ivan.milic on topic Tab links to articles
Change it to this:
then add this javascript
<script>
jQuery(window).load(function(){
jQuery('a[link]').click(function(event){
e.preventDefault();
window.location = jQuery(this).attr('link');
});
});
</script>
Code:
<a href="#fragment-<?php echo $loop; ?>" link="<?php echo $link[$loop]; ?>" >
then add this javascript
<script>
jQuery(window).load(function(){
jQuery('a[link]').click(function(event){
e.preventDefault();
window.location = jQuery(this).attr('link');
});
});
</script>
Please Log in to join the conversation.
-
fitzbeck
Inactive member - Topic Author
- New Member
Less
More
- Posts: 2
- Thank you received: 0
11 years 6 months ago #30038
by fitzbeck
Replied by fitzbeck on topic [SOLVED] Tab links to articles
Brilliant - many thanks Ivan. Worked a treat.
please note i did add an 'e' to the JS function for it to work:
please note i did add an 'e' to the JS function for it to work:
Code:
<script>
jQuery(window).load(function(e){
jQuery('a[link]').click(function(event){
e.preventDefault();
window.location = jQuery(this).attr('link');
});
});
</script>
Please Log in to join the conversation.
-
ivan.milic
Support Staff - Moderator
Less
More
- Posts: 14116
- Thank you received: 1639
11 years 6 months ago #30048
by ivan.milic
Replied by ivan.milic on topic [SOLVED] Tab links to articles
yes sorry for missing e, glad you sow it, thank you
Please Log in to join the conversation.
Time to create page: 0.159 seconds