F
F
FOcuswOwX2014-02-06 00:19:00
PHP
FOcuswOwX, 2014-02-06 00:19:00

Popup Authorization Form Joomla

I made a pop-up authorization on Joomla via facebox, but it only works on the button

<a id="login-button" href="#login-modal" rel="facebox" >Вход</a>
But I can't do it through the menu item. I understood that it works if the rel="facebox" parameter is written on the button, but how to make this attribute to a separate menu item. There was an idea to bind to item-id, but there is no selenium in php. Please advise how this can be implemented. Thanks in advance.
Facebox type js is normal.
ps demo here
<?php if('item-'.$item->id == item-480)
{}
?>
something like this, just don't know how to add rel="facebox" to item-480 .

Answer the question

In order to leave comments, you need to log in

1 answer(s)
P
Push Pull, 2014-02-06
@FOcuswOwX

<script type="text/javascript">
    jQuery(document).ready(function(jQuery) {
      jQuery('a[rel*=facebox]').facebox({
      })
    })
</script>

Change to
<script type="text/javascript">
    jQuery(document).ready(function(jQuery) {
      jQuery('#item-480').facebox({
      })
    })
</script>

But this is a short-term solution, as I understand it, id is generated automatically, and can change. In order not to lose the window, it is better to change the output of the html menu, and add the "Login" item with your unique id or class

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question