lundi 27 juin 2016

Array map of data to an html class

I am trying to add a link to some logos on a webpage. The page is rendered using java script. I have got it linking to another page already, the problem is that I need to have each logo open a modal box within that link. I am doing this through wordpress using a plugin called easy modal.

So I have some code that iterates through all of the different options to display and each one is displayed using the following code:

<div class="logo"><a href="https:http://ift.tt/28YTfZN" class=""><img src="' + data.logo + '" title="' + data.name + '"></a></div>

The way the easy modal works is that it identifies which modal to open by the class on the link. It will be something like eModal-#. So somehow I need to make an array that links the data ids with the correct eModal.



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire