<a href> not clickable because it inside realtime(synchronous) changes when using signalr

i develop notifications using signalr , process work good but when click on not clickable but if i click on it more time it will open url , because it inside realtime update (signalr) my code that show notifications :

<ul class="dropdown-menu dropdown-custom dropdown-menu-left"> <li class="dropdown-header text-center">Notifications</li><li id="notifycontent"></li></ul> 

Script that show notifications and url

<script> function getData() {         var $notifycontent = $('#notifycontent');         $.ajax({             url: 'Default.aspx/GetData',             contentType: "application/json; charset=utf-8",             dataType: "json",             type: "POST",             success: function (data) {                 if (data.d.length > 0) {                     var newdata = data.d;                     $notifycontent.empty();                     var rows = [];                     for (var i = 0; i < newdata.length; i++) {                         $notifycontent.append('<div class="alert alert-info alert-alt"><a href=' + newdata[i].Url + '&NotifyID=' + newdata[i].ID + '><small class="text-success" style="float: left">' + newdata[i].CreatedDate + '</small><br>' + newdata[i].Message + '</a></div>');                     }                                     }             }          });</script> 

i want to open url directly if i click the not click more time to open it how to solve this point . thanks in advance

Add Comment
0 Answer(s)

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.