Кнопка AngularJs не отвечает на карты при нажатии - PullRequest
1 голос
/ 11 марта 2019

Кнопки не отвечают внутри карт. Моя цель - показать и скрыть часы после нажатия кнопки для каждой карты. Я добавил Javascript для обработки этой функции, но она не отвечает. Когда я создаю кнопку вне тега, кнопки, кажется, работают нормально, и сценарии работают нормально. Любое и все понимание будет высоко ценится, что я пропускаю, так как я перепробовал почти все, что у меня есть следующее:

<style>
    .form-section {
        width: 321px;
        flex-wrap: wrap;
    }
</style>
<script type="text/javascript">
     $(document).ready(function() {

     $(".lebron").click(function () {
     $(".hi").hide();
     });
    $(".james").click(function () {
     $(".hi").show();
     });
    $(".k").click(function () {
     $(".hi").show();
     });
});



</script>
<script>

    $scope.showHours = function(){
    $('.hi').hide();
    };
</script>

<link href="//@System.Configuration.ConfigurationManager.AppSettings["CDNBase"]/Content/themes/OpenCart/stylesheet.min.css" rel="stylesheet" /> <!--@@sk updated at 06/03/2018-->
<link href="//@System.Configuration.ConfigurationManager.AppSettings["CDNBase"]/Content/themes/OpenCart/typo.min.css" rel="stylesheet" />@*sk updated at 06/03/2018*@


<div class="container" style="background-color:blue;" ng-controller="StoreController" ng-cloak>

    <img src="../images/StoreLocations/locationsPageBanner.jpg" style="padding-bottom: 25px">


    <div class='md-padding' layout="row" layout-wrap style="">

        <md-content class="md-padding" layout="row" layout-wrap ng-repeat="store in lstStores.data" style="background-color:pink;">

            <md-card class="form-section">



                <md-card-header style="background-color: dodgerblue; font-size:21px; color: white">
                    <md-card-header-text>
                        <md-card-header-text class="md-title" ng-bind="store.storeDisplayLink | uppercase"></md-card-header-text>
                        <md-card-header-text class="md-subhead" , style="color: lightgrey"> <span ng-bind="store.StoreCity"> city,state </span></md-card-header-text>
                    </md-card-header-text>
                </md-card-header>


                <md-card-content>
                    <div>
                        <p>
                            <ng-bind-html ng-bind-html="store.StoreAddress"></ng-bind-html>
                        </p>
                        <p>
                            @*<a target="_self" ng-href="/Location/store/{{store.storeId}}">Get Map</a><br />*@

                            <span ng-if="isMobile == true"><a href="tel:{{store.storeMainPhone | EliminateSpaces}}"> {{store.storeMainPhone | uppercase}} </a></span> <span ng-if="isMobile == false">{{store.storeMainPhone | uppercase}}</span>
                            <br />
                            <br />


                            <button class="hours" style="width:110px" ng-click="showHours()">
                                Store Hours
                            </button>

                            <div class="Hours">
                                <ng-bind-html ng-bind-html="store.StoreHours"></ng-bind-html>
                            </div>

                            <br />
                            <a target="_self" ng-href="/{{store.storeDisplayUrl}}" style="font-weight: 700;color: black;text-decoration: none;font-size: 16px;">Get Map</a>
                            <a href="/Location/Index" target="_self" class="location-icon-333 "></a>
                        </p>
                    </div>
                </md-card-content>


            </md-card>
        </md-content>
    </div>

</div>
...