i'm trying to compare image path as this example. http://www.w3schools.com/js/tryit.asp?filename=tryjs_intro_lightbulb .
when i use alert(Apperyio.getImagePath('pimage')); i got only " ../img/pimage "
how can i get full image path so that i can compare both image SRC ?
my code :
var a= Appery('pimage').attr('src',Appery.getImagePath("a.png"));
if (a){
alert("id con");
Code: Select all
Appery('pimage').attr('src',Appery.getImagePath("b.png"));
}
else{
alert("else ");
Appery('pimage').attr('src',Apperyio.getImagePath("a.png"));
}
using this code, only if condition true EVERY time .
1st time, if i click on image - "if condition" true and image change. now again i click on that image again if condition are true.
if i click on image, "IF condition " true and image change and if i click again on image, image are change. (eg, image a.png > image b.png > image a.png )