i have so many categories and each category have so many items. like a food website. ok now i want to use fancy box. when burger category was click . i want to show different fancy box. and when kebabas category was clicked i want to show another fancybox.. The category is coming from database.. how can i do this ?
my html code is :
<td width="73" style="text-align:right;"><a href="#inline" class="modalbox" onClick="insert(<?php echo $viewItem['item_id']; ?>);"><img src="_assets/images/add.gif" /></a>
</td>
fancybox :
<!-- hidden inline form -->
<div id="inline">
<h3>Please select any salad or sauce</h3>
<form id="contact" name="contact" action="#" method="post">
<p>
<label>
<input type="checkbox" name="CheckboxGroup1" value="checkbox" id="CheckboxGroup1_0" />
Ketchup</label>
<label>
<input type="checkbox" name="CheckboxGroup1" value="checkbox" id="CheckboxGroup1_1" />
Mayonnaise</label>
<label>
<input type="checkbox" name="CheckboxGroup1" value="checkbox" id="CheckboxGroup1_2" />
Mint</label>
<br />
<br />
<label>
<input type="checkbox" name="CheckboxGroup1" value="checkbox" id="CheckboxGroup1_2" />
Yogurt</label>
<label>
<input type="checkbox" name="CheckboxGroup1" value="checkbox" id="CheckboxGroup1_2" />
Garlic</label>
<label>
<input type="checkbox" name="CheckboxGroup1" value="checkbox" id="CheckboxGroup1_2" />
Mayo</label>
<label>
<input type="checkbox" name="CheckboxGroup1" value="checkbox" id="CheckboxGroup1_2" />
BBQ</label>
<br />
</p>
<button id="send" onclick="$.fancybox.close();">Select</button>
</form>
</div>
jquery:
if(result[4] == 7 || result[4] == 8){
$(".modalbox").fancybox();}
else{
}
}