0

Right now when you click a portfolio item the page scrolls up and then the modal opens how can I adjust it so the page stays in the same place?

I am using bootbox.js and bootstrap 3, you can check out what Im talking about here (just scroll down to portfolio and click one of the images)

1 Answer 1

1

In your anchor <a> tags change the href attribute to javascript:void(0);, like this snippet of code.

<a href="javascript:void(0);" id="branding3">
                        <img src="img/projects/thumbs/branding3.jpg" alt="...">
                        <span class="portfolio-hover">
                          <span>
                            <h4>Synex</h4>
                            <em>Branding</em>
                          </span>
                        </span>
                    </a>

Currently you have some pound symbol (#) within your anchor tags' href in which does not point to any id attribute in your tags. That is why the page scrolls directly to the top when you click those links.

1
  • I ran into another issue which makes this solution not work anymore! I have been trying to figure it out for a whole day if you want to take a look at my new question for some extra points :) Mar 22, 2014 at 6:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.