links in Home Page Quark...

Support desk for Multipurpose Quark Theme
GK User
Tue Feb 23, 2016 12:51 am
Hi. Is there any possibility to add 2 links to internal site urls in home page ?, I mean the module: Header, I need the link on header_img.png, and another link in the module: Mainbody content in this image: life_is_motion .jpg, thanks, greetings ...
User avatar
Platinum Boarder

GK User
Tue Feb 23, 2016 1:51 pm
Hello,

Please try to add the following JS code at the end of the one of template JS files:

Code: Select all
jQuery(document).ready(function() {
jQuery('img[src$="header_img.png"]').on('click', function() {
   window.location.href = "http://example.com";
});

jQuery('img[src$="life_is_motion.jpg"]').on('click', function() {
   window.location.href = "http://example.com";
});
});


of course please remember to replace http://example.com to your URLs in both cases.
User avatar
Moderator

GK User
Tue Feb 23, 2016 2:41 pm
Hi. I have no idea what kind of change you have made. The site gives me randomly: 500 Internal Server Error, nginx / 1.8.0, whether in Front-End, in Back-End. Sometimes it works, sometimes not, could you tell me please, thank you, greetings ...
User avatar
Platinum Boarder

GK User
Tue Feb 23, 2016 3:22 pm
Hi. I confirm that I can now enter the site. Just use your code, but it does not work ... any ideas ?, thanks, greetings ...
User avatar
Platinum Boarder

GK User
Tue Feb 23, 2016 6:03 pm
In which file did you added my code? Regarding your issues - it cannot be related with my changes, because I've only modified one menu item settings - most probably it is your hosting issue.
User avatar
Moderator

GK User
Wed Feb 24, 2016 12:29 am
Hi. Please could you tell me where add your code, that is, the file name, path ?, thanks, greetings ... As for the 500 error, until now never happened something like this on the site ...
User avatar
Platinum Boarder

GK User
Wed Feb 24, 2016 11:50 am
You can add my code at the end of the templates/gk_quark/js/gk.scripts.js file
User avatar
Moderator

GK User
Wed Feb 24, 2016 2:28 pm
Hello, in code works in the click event, but I do not see the typical hand when I pass the mouse above the image, therefore, the client can not know if a click event or not ... Could you change the code to be full all functions ?, thanks, greetings ...
User avatar
Platinum Boarder

GK User
Wed Feb 24, 2016 5:34 pm
This need a CSS change - please add the following Custom CSS code in example under the Custom CSS code option under the template advanced settings:

Code: Select all
img[src$="header_img.png"],
img[src$="life_is_motion.jpg"] {
    cursor: pointer;
}
User avatar
Moderator

GK User
Wed Feb 24, 2016 9:56 pm
Hi. Problem turned out perfect ... thanks, greetings from Italy ...
User avatar
Platinum Boarder


cron