cleiver Posted February 8, 2017 Share Posted February 8, 2017 procedure TMainForm.UniFormShow(Sender: TObject); begin UniLabel1.Caption := '<html>' + '<head>' + ' <title>Menu Dropdown - Linha de Código</title>' + '</head>' + '<body>' + '<ul id="nav">' + ' <li><a href="#">Home</a></li>' + ' <li><a href="#">Sobre</a></li>' + ' <li><a href="#">O que Fazemos?</a>' + ' <ul>' + ' <li><a href="#">Web Design</a></li>' + ' <li><a href="#">Hospedagem</a></li>' + ' <li><a href="#">SEO</a></li>' + ' <li><a href="#">Sistemas</a></li>' + ' </ul>' + ' </li>' + ' <li><a href="#">Contato</a></li>' + ' </ul>' + '</body>' + '</html>'; end; How do I identify which option was selected in the code How do I identify which option was selected in the code Quote Link to comment Share on other sites More sharing options...
Sherzod Posted February 9, 2017 Share Posted February 9, 2017 Hi, You can try something like this: procedure TMainForm.UniFormShow(Sender: TObject); begin ... ... UniSession.AddJS('$("#nav li").click(function(e) {alert(e.currentTarget.innerText); e.stopPropagation()})'); end; Best regards. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.