Search Results

Search found 2 results on 1 pages for 'user1704514'.

Page 1/1 | 1 

  • Populate javascript array with PHP array of Variables

    - by user1704514
    The following code is used to populate a pie chart in javascript: <script type="text/javascript"> var agg = { label: 'Aggressive', pct: [60, 10, 6, 30, 14, 10] }, bal = { label: 'Balanced', pct: [24, 7, 2, 18, 13, 36] }, mod = { label: 'Moderate', pct: [12, 4, 2, 10, 11, 61] }, inc = { label: 'Income', pct: [ 0, 0, 0, 0, 0,100] }, </script> Instead of tm: [40, 60, 67, 30, 74, 50] as seen above, I would like to make each of 6 values a php variable. Like: tm: [$r1, $r2, $r3, $r4, $r5, $r6] . How do I do this? How do I do this with? A php array or json encode?

    Read the article

  • CSS div and image opacity effect

    - by user1704514
    The following code shows the image in the div tag. <div class='item'> <img class='img' src="image1.png" alt="" /> </div> I am using the following css to add effects to the html image code: img{ width:50px; height:50px; opacity:0.4; filter:alpha(opacity=40); } img:hover{ opacity:1.0; filter:alpha(opacity=100); } I am using this to have opacity effects in css. With this code, the opacity effect works well when I hover over the image itself. But how do I make it so that the opacity effect on the image occurs when I hover over the div tag instead. I want to be able to hover over any part of the item div which encapsulated the image, to get the change opacity effect on the image. NB effect on just the image not the entire div. Can this be done in css? If so how?

    Read the article

1