views:

251

answers:

2

I am trying to make use of Colorbox on my webpage. One specific feature does not work as expected, though.

In their example (Outside Webpage - Iframe specifically) Google appears in the Colorbox when clicked. When you change href on that link (Using Firebug or JavaScript, e.g.) to, let's say, Yahoo, it works as expected and Yahoo is displayed after click.

But not in my case. Once I click the link, I have no way to change the URL. Href, as displayed in browser, changes (to Yahoo), but click always opens the first page (Google).

What might be the problem?

I almost copy-pasted their example:

<script src="/lib/jquery.js"></script>
<script src="/lib/jquery.colorbox.js"></script>

<p><a class='example7' href="http://yahoo.com"&gt;Outside Webpage (Iframe)</a></p>

<script>
$(document).ready(function(){
    $(".example7").colorbox({width:"80%", height:"80%", iframe:true});
});
</script>

My jquery version is 1.4.1 but I also tried same version as their example uses (1.3.2)

A: 

'Almost' copy pasted their code ... how about:

HTML

<p><a class='example7' href="http://yahoo.com"&gt;Outside Webpage (Iframe)</a></p>

jQuery

$(document).ready(function(){
    $(".example7").colorbox({width:"80%", height:"80%", iframe:true});
});

demo

wiifm
This does NOT work for me, too...
Josef Sábl
A: 

It turns out it maybe was a bug in Colorbox and it was fixed by author yesterday.

Thanks, Jack!

Josef Sábl