Hello all,
I've some problem with MyBB PopupMenu position
When I click to the <a> tag had popup menu id. The popup menu not appear under the link I clicked.
How to fix this ?
That tutorial introduce how to create dropdown menu based on popup menu built in MyBB. I did that in my website, the popup menu in posbit work fine but when I tried to add new popup in header. The menu did not appear under the <a> tag.
I don't know what was happened.
Did you use the required div class?
<a href="javascript:;" id="someid">Text</a>
<div id="someid_popup" class="popup_menu" style="display: none;">
Popup content goes here
</div>
<script type="text/javascript">
// <!--
if(use_xmlhttprequest == "1")
{
new PopupMenu("someid");
}
// -->
</script>
Replace some id with your id, keep in mind that the value of your identifiers (id tag) must be always unique - if you are going to use it in posts add _{$post['pid']} after someid in a tag (someid_{$post['pid']})div tag (someid_{$post['pid']}_popup) and in script tag (new PopupMenu("someid_{$post['pid']}"); ).
if you are going to use it as a dropdown menu in header place you unique id's after someid_x (where x is 1,2,3 and so on).
@Johnny S : Your code is what exactly code I already had in my templates.
Please post the template code that you are having issues with.