So I am working on a WordPress plugin and is near completion except for one detail.
WordPress allows you to save variables to a page in a plugin option menu which I have done but now I want to use the variable saved in a separate .js file.
so it is from $userChoice is saved (in a .php) and I want to use it as
jQuery().ready(function() {
jQuery('body').loadit('$userChoice','wrapper');}
but I am lost as to how I can achieve this,google returned some info but nothing I was able to understand as relevant... can I use php variables in a separate .js file or are there other ways of achieving the same result? and help would be appreciated.
This post has been edited by floppyspace: 26 March 2012 - 04:52 AM

New Topic/Question
Reply



MultiQuote




|