javascript - Powertip Link to open Sharepoint 2013 Modal Dialog -


i created link loads powertip tooltip link in it, have jquery function looks class of link , opens content in modal dialog in sharepoint. works links in page, not work link in tooltip.

how can fix this?

this code powertip tooltip.

$(function() {   var mouseondiv = $('.linkclass');   var tipcontent = $('<a href="#" class="modal-link">text</a>'   );   mouseondiv.data('powertipjq', tipcontent);   mouseondiv.powertip({     placement: 's',     mouseontopopup: true   }); }); 

here code modal dialog load.

$(document).ready(function() {          $("a.modal-link").on("click", function(e){              var destination = $(this).attr("href");               if(destination.indexof("?") > -1) {                 destination += "&isdlg=1";             }             else {                 destination += "?isdlg=1";             }              var title = $(this).text();              var dialog = sp.ui.modaldialog.showmodaldialog({                         title: title,                         url: destination,                         autosize: true,                         width: 1024,                         height: 800                     });             e.preventdefault();         });     }); 


Comments

Popular posts from this blog

html - How to style widget with post count different than without post count -

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

javascript - storing input from prompt in array and displaying the array -