Pregunta

I've got a more complicated Colorbox but as a test I can't even get this to work.

What is wrong with my code? Have I missed something out?

HTML

<a class="cover" href="http://www.bbc.co.uk">
    bbc
</a>

JavaScript

$(document).ready(function(){
  $(".cover").colorbox({
    iframe: true,
    innerWidth: 400,
    innerHeight: 400
  });
});
¿Fue útil?

Solución

Is your code set in the jquery ready() event ?

<script>
  $(document).ready(function() {

      $(".cover").colorbox({ iframe:true, innerWidth:"400px", innerHeight:"400px"});

  });
</script>
Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top