Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 418
  • Last Modified:

Palce a PHP avariable into JQuery Script

How do you place a PHP variable into a JQuey Script?
See currentAmount: below.
<?php
$gaol = "23";
?>

<script>
!function($){
$.fn.extend({
goalProgress: function(options) {
var defaults = {
goalAmount: 100,
[b]currentAmount:.'$goal'.,[/b]
speed: 1000,
textBefore: '',
textAfter: '',
milestoneNumber: 70,
milestoneClass: 'almost-full',
callback: function() {}
}

etc....

</script>

Open in new window

0
rgranlund
Asked:
rgranlund
1 Solution
 
Chris StanyonCommented:
Just echo it :)

currentAmount: <?php echo $goal; ?>,

Open in new window

0
 
rgranlundAuthor Commented:
Thanks!
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now