Hello,
I am using a separate PHP file as a configuration file for everything else on a basic ecommerce site.
Here is config/products.php:
$product1["short"] = "product one";
$product1["menuimgslideshowsrc"] = "image/product1.jpg";
When I hover over a button, I want to get $product1["menuimgslideshowsrc"]
and swap it out with an IMG SRC.
I can do the swapping no problem, I need to know how to get the information stored in $product1["menuimgslideshowsrc"]
. I assume I would use Ajax, but I am open to other ideas.
Thanks in advance.
EDIT:
Current code
$( '.leftMenuProductButton' ).hover (
function () {
var currentIMG = $("#swapImg").attr("src");
$("#swapImg").attr("src").replace(currentIMG, "NEWIMAGE");
},
function () {
});