Javascript Problems in IONIC App

I am attempting to build my first app in ionic. I have the general idea about the structure of the framework. I am just having issues with my javascript. I have added javascript to the app.js file in my ionic 1 app but it is not working. I have tried endless variations and placement of the javascript without it working. Can someone please help me out?

angular.module(‘app’, [‘ionic’, ‘app.controllers’, ‘app.routes’, ‘app.directives’, ‘’ ,])

.run(function($ionicPlatform) {
$ionicPlatform.ready(function() {
// Hide the accessory bar by default (remove this to show the accessory bar above the keyboard
// for form inputs)
if (window.cordova && window.cordova.plugins && window.cordova.plugins.Keyboard) {
if (window.StatusBar) {
// org.apache.cordova.statusbar required

$(’#sites input:radio’).addClass(‘input_hidden’);
$(’#sites label’).click(function() {

$(document).ready(function() {
$(’.options’).on(‘change’, ‘input’, function() {
var $self = $(this);
var inputType = $self.attr(‘type’);

    if (inputType == 'radio') {
    } else if (inputType == 'checkbox') {


function runUpdate() {
// get the sum of the elements
var calories = $(".caloriesSum", ‘.active’).sum();
var fat = $(".fatSum", ‘.active’).sum();
var satfat = $(".satfatSum", ‘.active’).sum();
var carbs = $(".carbsSum", ‘.active’).sum();
var protein = $(".proteinSum", ‘.active’).sum();
var sodium = $(".sodiumSum", ‘.active’).sum();
var chloresterol = $(".chloesterolSum", ‘.active’).sum();

// update the total