Neil Dhakal
Neil Dhakal

Reputation: 363

How can i give a image path in jquery?

How to change image path in jquery, i want to change this image path:

loader_path: 'images/prettyPopin/loader.gif'

i used this code but not work

loader_path: '<?php echo theme_img('prettyPopin/loader.gif'); ?>

Upvotes: 1

Views: 199

Answers (2)

Try

"<?php echo theme_img('prettyPopin/loader.gif'); ?>"

Don't Mix quotes

prettyPopin/loader.gif is string not a variable

Upvotes: 1

Rab
Rab

Reputation: 35572

loader_path: '<?php echo theme_img('prettyPopin/loader.gif'); ?>'

you're missing closing quote.. – Sudhir

Upvotes: 1

Related Questions