queue  5
support
Results 1 to 7 of 7

Thread: Disable project link ONLY in galleries projects and not in videos projects

  1. #1
    Junior Member
    Join Date
    Nov 2016
    Posts
    11

    Disable project link ONLY in galleries projects and not in videos projects

    Hello !
    Thanks to all your answers in the archives, I've managed to customize your great theme, except for this tiny details...
    adding this code in the Custom Js panel, disable the project title link in both the galleries projects and the videos projects..

    function removeProjTitleLink(){
    jQuery('.thumbImage .thumbText a').removeAttr('href');
    }
    document.addEventListener( "DOMContentLoaded", removeProjTitleLink, false );

    I would like to disable the link only in the galleries projects and not the videos ones. Also with this code, the icone showing there's a clickable link does not show (hovering over the magnifying icon)

    www.imoomi.fr

    Thank you for your help !
    Sam

  2. #2
    Lead Coder Fabio's Avatar
    Join Date
    Aug 2011
    Posts
    2,081
    Hello,

    replace your jQuery call with the following code

    Code:
    jQuery('#photos .thumbImage .thumbText a').removeAttr('href').unbind('click');
    My cave is full of servers

  3. #3
    Junior Member
    Join Date
    Nov 2016
    Posts
    11
    Hello Fabio,
    Sorry, this doesn't work :
    function removeProjTitleLink(){
    jQuery('#photos .thumbImage .thumbText a').removeAttr('href').unbind('click');
    }
    document.addEventListener( "DOMContentLoaded", removeProjTitleLink, false );

    You can't click on the magnify icon in the Photos section...
    Sorry
    Sam

  4. #4
    Lead Coder Fabio's Avatar
    Join Date
    Aug 2011
    Posts
    2,081
    I tested it and it works but maybe I didn't understand what you're trying to accomplish.
    Disabling the link removes the lightbox feature, hence clicking the magnify icon won't do anything.
    My cave is full of servers

  5. #5
    Junior Member
    Join Date
    Nov 2016
    Posts
    11
    Sorry for not beeing clear...

    In the Videos section, I don't mind having the 2 links options :
    - When you click on the title, you go to a different page (http://imoomi.fr/index.php/project/cuckoon/)
    - When you click on the magnify icon, the lightbox opens in the same window (http://imoomi.fr/#prettyPhoto/7/)

    In the Photos section, I would only like to have the magnify icon clickable (http://imoomi.fr/#prettyPhoto[%27portraits%27]/0/)
    And disable the title link that opens a new window (http://imoomi.fr/index.php/project/portraits/)
    In other words, only keep the lightbox feature for the photo section.

    Thanks again once more, I hope I've made myself understood !
    Sam

  6. #6
    Lead Coder Fabio's Avatar
    Join Date
    Aug 2011
    Posts
    2,081
    Ok, i think I got it now

    Code:
    jQuery('#photos .thumbText a').removeAttr('href');
    let me know if the above code works as intended (replace the jQuery call in your original post)
    My cave is full of servers

  7. #7
    Junior Member
    Join Date
    Nov 2016
    Posts
    11
    Hello !

    Sorry, it's not working, the arrow pointer stays on even hovering on the magnify icon, and the lightbox doesn't open.
    I left the code you sent me for you to see on the site imoomi.fr :

    function removeProjTitleLink(){
    jQuery('#photos .thumbText a').removeAttr('href');
    }
    document.addEventListener( "DOMContentLoaded", removeProjTitleLink, false );

    Sorry again
    Sam