How to apply button code to a word?

I have a flag button, when you click it a popup window open to select alternative countries,

<button class="flag-menu country-flag btn btn-default" id="#selectCountry" data-toggle="modal" data-target="#selectCountry" style="margin-left: 20px;margin-top: 8px">
                    <img src="{SITE_URL}templates/{TPL_NAME}/images/flags/{USER_COUNTRY}.png" style="float: left;">

I would to apply this code to a word <li>{LANG_COUNTRYSELECT}</li>

So when you click on the word the popup window opens

I have tried a variety of code combinations, yet without success,

all help appreciated :smile:

Can you give a bit more detail on what you’re trying to achieve, I’m having a bit of trouble picturing the request and how it relates to the code you posted?

Is it PHP? I just see some template variables in there. What templating system is being used?

1 Like

Try removing the hash and see if it works.

Edit:
Also this hash:

data-target="#selectCountry"

1 Like

Hello John,

Thank you for your reply,

What I was wanting to acheiev was adding code to the <li>{LANG_COUNTRYSELECT}</li> to create a clickable link

<li> data-target="#selectCountry"{LANG_COUNTRYSELECT}</li>

But I have no idea how ?

Your help appreciated :slight_smile:

Where did you get the script from? Can you supply the source?

1 Like

Hello John,

Appreciate your reply considering my lack of additional info,

Yet that is all I have at this time :slight_smile:

Somewhere, there will be some code (possibly JavaScript) that reacts to the button being pressed and opens up your country selection. That might be the key - if you can see how to make the same code trigger when your list-item is clicked on.

1 Like

I would try Googling for your requirements plus add example or demo.

With a bit of luck the search results will return fully working examples that may be modified to your requirements.

1 Like

I apologize if I’ve forgotten, but please give the context again. What plugin, template engine, theme, whatever, is this being used with?

1 Like

Thank you droopsnoot, John_Betong, Mittineague for your replies,

I will continue trying, and searching for a coding solution,

your replies greatly appreciated :slight_smile:

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.