0
<script type="text/javascript" charset="utf-8"> $(document).ready(function(){ $(".popup-thumb").colorbox({inline:true, width:"50%"}); }); </script> <a href="#bap1" class="popup-thumb"> <img src="projects/bachelor/thumb001.png"> <div class="summary"> <h5>..</h5> <p>...</p> </div> </a> <div style="display: none;"> <div class="popup" id="bap1"> <p>...</p> <img src="projects/bachelor/001.png"> <ul>.. </ul> </div> </div> 

I don't know why it's not working. The popup div doesn't appear at all. I think it's some simple trick...

1
  • did that work for you? Commented Feb 6, 2013 at 22:46

1 Answer 1

5

You're wrapping an anchor tag around a block element which isn't semantic in non HTML5 environments.

So if you fix your HTML it should work here is a fiddle http://jsfiddle.net/bNa3Z/

<a href="#bap1" class="popup-thumb">Show</a> <div style="display: none;"> <div class="popup" id="bap1"> <p>Hello World</p> </div> </div> 

Added jQuery:

$(document).ready(function(){ $(".popup-thumb").colorbox({inline:true, width:"50%"}); }); 

Note - This is working code as seen in the fiddle, so if this still isn't working for you be sure to make sure that jQuery is running -

$(function(){ alert('jQuery is running.'); }); 

And that you ar properly including your plugin.

Sign up to request clarification or add additional context in comments.

2 Comments

I did as you said, but it still doesn't work..Totally confused
I found that's another js file running before the jquery has some error..Thanks anyway :)

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.