WordPress not loading custom javascript library
-
Hi,
I am trying to run some javascript libraries in wordpress for a finance calculator. I can run this calculator no problem stand alone, just as a html file. see link here
https://78.129.155.241/~ryedalel/calculate/
This works fine but as soon as I try to make a page in wordpress to display this calculator it does not work. See this link
https://78.129.155.241/~ryedalel/calculate-wordpress/
I have disabled all plugins and changed to default theme but the error still remains. I have also followed various tutorials to correctly enqueue the script as required by wordpress but still the error is there.
This is the first time I have tried to add custom javascript to wordpress so I’m probably missing something fundamental here but I have no idea what.
Can anyone point me in the right direction?
The calculator code is below:
<div ng-controller="financeCalcController"><![if gte IE 9]> <div ng-controller="financeCalcController"> <link rel="stylesheet" href="https://78.129.155.241/~ryedalel/calculate/js/jquery.nouislider.css" /> <link href='https://78.129.155.241/~ryedalel/calculate/js/app.min.css' rel='stylesheet' type='text/css'> <div class="finance-calc"> <div id="finance-popup-inner"> <h2>Finance options with Black Horse</h2> <section class="finance-form"> <p>How much are you looking to finance, and for how long?</p> <div class="cost finance-slider"> <div class="cost">£<input style='width: 80%' ng-model="cost"/><span class='finance-caption'>Cost</span></div> <div ng-click="calcchange = true" class="slideui" slider ng-model="cost" start=2500 end=40000 step=100></div> </div> <div class="cost finance-slider"> <div class="cost">£<input style='width: 80%' ng-model="deposit"/><span class='finance-caption'>Deposit</span></div> <div ng-click="calcchange = true" class="slideui" slider ng-model="deposit" start=0 end=40000 step=10></div> </div> <div class="months finance-slider"> <div class="cost"><h4 class="value" ng-bind="( months ) + ' months'"></h4><span class='finance-caption'>Duration</span></div> <div ng-click="calcchange = true" class="slideui" slider ng-model="months" start=12 end=84 step=12></div> </div> <button ng-click="calculatePayments()" ng-bind="( calcchange && nocalc == false| switch : 'Recalculate finance' : 'Calculate finance' )"></button> </section> <section id="finance-results" ng-class="{changed: calcchange}"> <img src="images/blackhorse-finance-calculator.jpg" style="width: 60%;"> <h3>Repayment plan</h3> <p>We can offer you the following repayment plan:</p> <dl> <div class="finance-prop"> <dt ng-bind="( months ) + ' monthly payments'"></dt> <dd ng-bind="( payment.term | currency: '£' )"></dd> </div> <div class="finance-prop total"> <dt>Total</dt> <dd ng-bind="( payment.total | currency: '£' )"></dd> </div> <p>At <span ng-bind='(apr * 100)'></span>% APR Representative, you'd pay that off by <span ng-bind="( payment.enddate | date : 'MMM yyyy' )"></span><br><small><small>* Finance is subject to status and is only available to UK residents aged 18 and over. Finance provided by Black Horse Limited, St William House, Tresillian Terrace, Cardiff CF10 5BH.</small></small></p> <p><small>Ryedale Caravans is authorised by the FCA with Limited Permission to conduct certain credit related activity</small><br /><small>We are a credit broker/intermediary and can introduce you to a limited number of lenders who provide funding. We may receive commission or other benefits for introducing you to such lenders.</small></p> </dl> <div class="clearfix"></div> </section> </div> </div> </div> <script src='https://78.129.155.241/~ryedalel/calculate/js/libs.min.js'></script> <script src='https://78.129.155.241/~ryedalel/calculate/js/app.min.js'></script> <![endif]></div>
- The topic ‘WordPress not loading custom javascript library’ is closed to new replies.