Hi, I have incluced jquery in my ionic project, but it doesn’t seem to work.
html code:
<link href="lib/ionic/css/ionic.css" rel="stylesheet">
<link href="css/style.css" rel="stylesheet">
<!-- IF using Sass (run gulp sass first), then uncomment below and remove the CSS includes above
<link href="css/ionic.app.css" rel="stylesheet">
-->
<!-- ionic/angularjs js -->
<script src="lib/ionic/js/jquery-2.1.3.min.js"></script>
<script src="lib/ionic/js/ionic.bundle.js"></script>
<!-- cordova script (this will be a 404 during development) -->
<script src="cordova.js"></script>
<!-- your app's js -->
<script src="js/app.js"></script>
<script src="js/index.js"></script>
<ion-pane>
<ion-header-bar class="bar-stable">
<h1 class="title">Ionic Blank Starter</h1>
</ion-header-bar>
<ion-content>
<div class="grid" onclick="change()">Peter Chen</div>
</ion-content>
</ion-pane>
index.js code:
function change(){
console.log(“here”);
$(’.grid’).css(‘height’, ‘20%’);
$(this).css(‘background-color’, ‘blue’);
}
Any idea why?