Thursday, January 18, 2018

OnClick change Images AngularJS

<div ng-app="FormApp" ng-controller="myController" max-width="1150px;" width="1150px;" >
    <input ng-show="ShowDown" type="image" style="width:250px; height:40px;" src="~/Content/Images/contactShow.png" ng-click="ShowHide()"/>
    <input ng-show="ShowUp" type="image" style="width:250px; height:40px;" src="~/Content/Images/contactHide.png" ng-click="ShowHide()" />
</div>


<script type="text/javascript">
    var app = angular.module('FormApp', [])
    app.controller('myController', function ($scope) {
        $scope.ShowDown = true;
        $scope.ShowUp = false;
 
        $scope.ShowHide = function () {
            $scope.ShowDown = $scope.ShowDown ? false : true;
            $scope.ShowUp = $scope.ShowUp ? false : true;
        }
    });
</script>

    

No comments:

Post a Comment

Recent Post

Databricks Delta table merge Example

here's some sample code that demonstrates a merge operation on a Delta table using PySpark:   from pyspark.sql import SparkSession # cre...