javascript - Appending Data within another file -
i hacking couple of wordpress plugins (not matters). have onclick function relates js
function located in 'plugin' folder.
what best way link main js file location 1 need in location 2?
example:
onclick="call_ajax_add_to_quotelist(add_to_quotelist_ajax_url,'.$product->id.');" '.$style.'>'.$label.''
call_ajax_add_to_quotelist
located in wp-content/plugins/plugin1/js.js
you have load wp-content/plugins/plugin1/js.js when need use call_ajax_add_to_quotelist function:
<script src="...wp-content/plugins/plugin1/js.js"></script>
hope helps!
Comments
Post a Comment