Creating HTML dynamically in JS tags for my Panel (using the syntax)

I am tryinng to dynamically generate a user interface for my Panel. Create tags work very well with the code below - the problem is the syntax for the background image.

// Construct HTML tags dynamically and append to content container
for (var i = 0; i < myList.length; i++){
    var html = "";
    html += "<button class='lol'>";
    html += "<span class='lol2' style='background-image: url(" + myList[i].icon + ")'></span>"; // Syntax broken here
    html += "<p class='lol3'>" + myList[i].text + "</p>";
    html += "</button>";
    $("#content").append(html);
}

The tags are generated fine - but I don't get the property background-image for them - probably because the url() attribute syntax is broken. Also important to mention is that myList [i] icon contains a string - so it's not a data problem.

The url of the background image is not a string itself? Try adding additional quotes in there:

var html = "";

Had to get away from them otherwise is a mess.

Hope this helps,

Davide Barranca

Tags: Photoshop

Similar Questions

  • How to create (or delete) a new tag for a Web site, so that his tag appears (or does not appear) whenever I restart Firefox?

    How to create (or delete) a new tag for a Web site, so that his tag appears (or does not appear) whenever I restart Firefox?

    See this - https://support.mozilla.org/en-US/kb/How%20to%20set%20the%20home%20page

  • I am trying to create dynamic landing pages that reflect the locations of my Google ads. How can I create a dynamic text on my landing page to specify the location in the title?

    I am trying to create dynamic landing pages that reflect the locations of my Google ads. How can I create a dynamic text on my landing page to specify the location in the title?

    Thanks a lot for your answer. I've sorted it now.

    Kind regards

    Gill

  • Whenever I try to create a text box indesign automatically for me and place the text in the middle.

    Whenever I try to create a text box indesign automatically for me and place the text in the middle. I can get the text moves if I play with the object ' menu ' detected block options, but it does every time. "

    Hello, welcome to the forum of InDesign. I'm a different Steve.

    What version of InDesign are you using? What operating system do you use?

    Tell us exactly how you create your text box (frame).

    The easiest way is to choose the tool of Type (T). Click and drag an image where you want to go.

    But, if you place the text to another program like Microsoft Word, click file > Place. Select the file and click Open. Drag-and-drop placement of text cursor to position it on the page.

  • I have a new time capsule airport. How to limit the search for who can use the time capsule backup process?

    I have a new time capsule airport. How to limit the search for who can use the time capsule backup process?

    Set a password to disk... disk tab in the utility... and just give to those you want to use the TC...

  • Search for files by using the Start button

    I've lost the ability to search for files by using the Start button.  I can enter a file name, but always get a response "nothing found".  I know I did something back a couple of weeks, but don't know what I did to turn it off. Help!

    Thank you!

    Take a look at my search installation tips.  If you are in these settings, you can make sure search is enabled and if necessary you can use the 'reconstruction' of the for button to rebuild your search system.

    http://Skeene.NET/tech/boost-Windows-search-in-two-steps/

    Also, there is an automated troubleshooting tool that tries to find and fix any problems with your search system.  You can go for it here:

    http://support.Microsoft.com/mats/windows_search/

  • You need Internet Explorer 5.5 or higher for Windows to use the Services of eRestaurant

    You need Internet Explorer 5.5 or higher for Windows to use the Services of eRestaurant

    Best place for support on this issue would be here...

    http://altametrics.com/support

  • Definition of MUSE created HTML with a transparent background for DPS

    I am currently using MUSE to create content that is then inserted in the DPS. However, try as I might I can't get the MUSE project to display in DPS with a transparent background. Any ideas?

    Hello

    You must modify the CSS (bearing the same name of file to Muse) and remove the tag, for example.

    HTML {}

    background-color: #ccc;

    }

    Works well

    __Felipe

  • How create iOS icons on the homescreen of device for my website using the muse of adobe?

    I know the code, you need to add is: < link rel = "apple-touch-icon" href="/custom_icon.png"/ >. How can I add this to my site from muse, and also how can I say to use my file? Or is this done through the adobe business catalyst?

    Forum I got this code is: http://developer.Apple.com/library/iOS/#documentation/AppleApplications/reference/SafariWe bContent/ConfiguringWebApplications/ConfiguringWebApplications.html

    Here is another forum that explain what I want to do, but I don't know how to do it in Muse: http://webdesign.tutsplus.com/tutorials/site-elements/quick-tip-custom-ios-home-screen-ico ns-for-your-website /

    Thank you for your help.

    I want to say is if you are able to access the image via a browser?

    The following URL throws a 404 error, which means that the picture does not exist at the specified location.

    http://www.8-13.nl/images/Apple-touch-icon.PNG

    The simplest would be to use the file-> add files to the download option and attach the image to your site from Muse, the image would be visible in the active panel and would publish in the /assets folder. Use the following code then in HTML for.

  • Unable to create the pool of IP required for configuration VXLAN using the API REST NSX

    Basically, I want to configure VXLAN using the REST API. To set up VXLAN, VMKNic IP addressing accepts DHCP or IP Pool. I decided to go with Pool of IP.

    To create a Pool of IP "NSX-DEV-IPPOOL-01', I used the REST APIs.»

    POST https:// < nsx - ip > /api/2.0/services/ipam/pools/scope/ < id data center >

    < ipamAddressPool >

    < name > NSX-IP-POOL-02 < / name >

    < LG > 24 < / LG >

    < gateway > 10.99.134.1 < / gateway >

    Lab.local < dnsSuffix > < / dnsSuffix >

    < dnsServer1 > 10.99.134.2 < / dnsServer1 >

    < dnsServer2 > < / dnsServer2 >

    < Plages_ip >

    < ipRangeDto >

    < startAddress > 10.99.134.225 < / startAddress >

    < endAddress > 10.99.134.229 < / endAddress >

    < / ipRangeDto >

    < / Plages_ip >

    < / ipamAddressPool >

    Now I can see the Pool of IP in vCenter under NSX Manager-> [NSX-Manager-IP]-> manage-> object-> Pools of IP group.

    nsx_ipPools.png

    But when configuring VXLAN, no IP pool is present.

    nsx_configurev_xlan.png

    Y at - it all the additional steps required after the addition of pool of IP using the REST API?

    Thanks in advance.

    Remove the existing IP pool.  Then recreate the pool by using the API, but instead of using with globalroot-0.

  • How can I watch and download videos like youtube flash videos if flash player can't stand not for mobile phones using the android version 4.0?

    My mobile android version is 4.1.2. At the present time, I can't watch and download videos from youtube. If flash player does not support any mobile by using the version of android more 4.0, how can I watch and download these flash videos?

    You can always download and install Flash for Android 4.0 which still works on android versions greater than 4.0, which is located on this site (http://helpx.adobe.com/flash-player/kb/archived-flash-player-versions.html), which is the own adobe site. Look for the Flash for Android 4.0 and the latest version. Although it is not advisable to use an outdated version of flash as it is not secure.

  • Can I connect VHS Video Recorder for Qosmio G20 using the antenna in the Port?

    Hello.

    I connect my G20 a very old VCR. Can I connect it to the antenna in the port? Someone at - it tried? Because it will not need to buy a cable SCART. And for what I searched by linking to the video in Port, if I want to record the signal, I have WinDVD record I did more.
    So I was wondering if connect the VCR to the antenna port. I'll be able to find and record the VHS signal on media center?
    Thank you

    I already tried on S - video In and I get black screen

    More: When I connect the laptop to a TV it works only via the S-video port. When I use the D-video port it simply doesn't work. The black screen.

    Of course you can do it. On this Qosmio laptop TV tuner works on the same principle as usual TV. You can watch movies on Qosmioplayer or using Media Center Edition VHS. In both cases start movie VHS and let Qosmioplayer or MCE sweep all TV channels. On one of them, you will see the picture of VHS VCR.

    All that s. I tested it with Qosmioplayer and MCE too. It works without any problem. I also tested recording option. This also works. Later, I edited material recorded and created DVDs.

    With short words: with Qosmio G20, you can do whatever you want. It's really good multimedia laptop.

  • Script not running task for all objects using the Get-Content cmdlet

    Hello

    For some reason when I run the code following the newspaper bundles are only being dumped for the first host in the hosts.txt file. I have a script that gets the bundles of paper for all hosts in a cluster and rename the cryptic file name to reflect the name of the host with good Luc. I could just use the script to get the beams to all hosts in the cluster, but there are times where I need just one or two hosts in the cluster. Can someone tell me what is the problem with the code below?

    $VC = Read-Host "Enter name vCenter.
    $varHost = get-Content "S:\Get-Logs\hosts.txt".

    ##Connect to VCenter
    SE connect-VIServer $VC - WarningAction SilentlyContinue
    #----------------------------------------------------


    {foreach ($ESX to $varHost)

    $destPath = 'S:\Get-Logs\Logs\$($ESX) ".

    If ((New-Item-chemin $destPath-ItemType répertoire-ErrorAction SilentlyContinue) - eq $null)
    {- New - path $destPath - directory - ErrorAction SilentlyContinue ItemType}

    Get - Log - VMHost $ESX - Bundle - DestinationPath $destPath


    }


    # Disconnect - VIServer
    Disconnect-VIServer *-confirm: $false
    The Script ##End

    Although it would be ideal for the log files should be renamed at this point I would be happy if the script would create a folder for each host listed in the text file and place the log file in each folder.

    Thank you

    The variable $ESX contains only a string, not a Name property.

    If you are referencing $ESX. Name will return nothing

  • Detail.html BC Open Platform WebApp file do not use the site template

    My WebApp I created using the open platform BC does not render the file detail.html correctly on the front-end server that he refuses to use the my site page template.

    The side admin of things work perfectly.

    On the front side, my page that makes the "catalogue" fine works and uses the page template, however, when I click on one points (which opens the detail.html) file the result makes all {tag_} entries on the page but it has no model of all.

    The full path to the file I want to talk to is/layout/WebApps/< my web application > detail.html

    I checked that the "Web App Options menu" put the 'Default Template' correctly to my site template, but it does not seem to use it.

    What I am doing wrong?

    I found the answer.

    I forgot to add the attribute template on webapp point itself.

    I add to the app Web, but not WebApp points.

  • There is a bar type to pass or web search that does not work after installation ver8. Meanwhile we for many sequence using the gogle search first, then go on the web that should be only type n with formla version before 8.

    I used a Firefox oldies until one day, she has been updated in the new version 8.0, then the access bar for research that has happened every time when I go to the website I do there and enter wasn't working more.
    I use Windows XP as an o/s, with Pentium dual core CPU.
    Finally, I used to tap on the Goggle search bar, entrance to enter the pint n research to go on the web I want.
    It make it difficult when in a hurry and make me upset.

    do not know who change the  search bar which is common to enter  web address on there and work excepted for this new Firefox 8.0.
    

    If any changes, please check and advice.
    Thank you
    Concerning

    Try Firefox SafeMode to see how it works there.

    A way of solving problems, which disables most of the modules.

    (If you use it, switch to the default theme).

    • You can open the mode without failure of Firefox 4.0 + by pressing the SHIFT key when you use the desktop Firefox or shortcut in the start menu.
    • Or use the Help menu option, click restart with the disabled... modules while Firefox is running.

    Do not choose anything at the moment, just use 'continue in safe mode.

    To exit safe mode of Firefox, simply close Firefox and wait a few seconds before using the shortcut of Firefox (without the Shift key) to open it again.

    If it's good in Firefox Safe mode, your problem is probably caused by an extension, and you need to understand that one.

    http://support.Mozilla.com/en-us/KB/troubleshooting+extensions+and+themes

    When find you what is causing that, please let us know. It might help others who have this problem.

Maybe you are looking for

  • Cannot connect iPhone and Macbook Pro with AirDrop and bluetooth

    Hello. I recently bought an iPhone 6 and I want to use Airdrop, but I can't find my iPhone on Mac and my Mac on iPhone. When I click bluetooth, then click on connect, it does not connect and on my iPhone it says I should check if my Mac is at hand. A

  • System labview application exec.vi

    Hello world I'm having a problem with the exec.vi system. I just want to open another program using labview. This method works every time I try to access it using the VI. However, when I turn the VI in an executable, the exec.vi system does nothing.

  • mSATA for x 220-questions

    I've read many threads on this topic, but given my level of understanding, I'm still not sure what and how to approach adding a mSATA. I have a x 220/i7/8 gb/128 GB SSD WIN7 running. I'm running out of space and I would like to add a second drive in

  • Older game launch

    I have a game that was released in 2007. The minimum conf is Windows 98/2000/XP. I was able to play this game very well on my old laptop which has Vista. I tried several times to uninstall and reinstall the game using several compatibility modes diff

  • searched for kindle and it does not see

    I had to go to Amazon and find the link for Kindle in the app store in their research instead of using the seemingly obscure "Kindle" keyword to find the Kindle app in the app store search.