Forum Replies Created

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter pxlray

    (@pxlray)

    I checked the snippet but I’m not sure how the code all works. What I’m hoping to do is have this show up instead of the social icons “Phone: ***-***-****”

    Hello 🙂

    I’m new to javascript. I created an external .js file (lightbox-viewer.js) with your suggested code in it.

    $(function() {
    $(‘.szg-main-photo’).click(function() {
    $(this).parent().append(‘<div class=”lightbox”><img src=”‘+$(this).attr(‘src’)+'” /></div>’);
    $(this).css({“opacity”: “0.1”});
    });
    });

    I know I can import the file using this:

    <script src=”lightbox-viewer.js”></script>

    I’m just not sure where in the file to place that line. It seems to hide the szg-main-photo if I put it anywhere.

    Sorry I’m a newb. :/

Viewing 2 replies - 1 through 2 (of 2 total)