How to apply button code to a word?


#1

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:


#2

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?


#3

Try removing the hash and see if it works.

Edit:
Also this hash:

data-target="#selectCountry"


#4

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:


#5

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


#6

Hello John,

Appreciate your reply considering my lack of additional info,

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


#7

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.


#8

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.


#9

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


#10

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:


#11

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