How to Add Colorbox Pop Up for Miva Quick View Button

923 views Asked by At

I'm trying to replicate the look of Nextopia's Quick View pop up. They are using Colorbox. An example on our site is at http://www.hatsinthebelfry.com/category/womens-hats.html

This is the Miva code for the current button (test page here: http://www.hatsinthebelfry.com/category/NEXtest.html)

Current Button:

<input type="button" value="Quick View" onClick="divwin=dhtmlwindow.open('divbox&mvt:product:id;', 'div', 'somediv&mvt:product:id;', '&mvt:global:JSProdName;', 'width=600px,height=560px,top=20px,scrolling=1, center=1'); return false" style="cursor:hand;" class="nxt_moreinfo">

This is the code I got from Jack Moore (the developer of Colorbox), but this is to open an html page. I need to open a div.

<button onclick='$.colorbox({href:"example.html"}); return false;'></button>

Can anyone tell me how to call the miva code correctly in the colorbox syntax?

2

There are 2 answers

4
webdeveloper On

As I understand you asking about this:

$.colorbox({ href: '#inline_content', inline:true });

And html:

<div style='display:none'>
     <div id='inline_content'>test</div>
</div>
0
Brian On
$.colorbox({ 
rel:'mycontent',
inline:true,
href: function(){var url = $(this).attr('href'); return url;}
});

<a rel="mycontent" href="do-something.php?productid=somevalue">Do Something</a>

The above allows for a single colorbox reference.