dimsemenov / Magnific-Popup

Light and responsive lightbox script with focus on performance.
http://dimsemenov.com/plugins/magnific-popup/
MIT License
11.39k stars 3.48k forks source link

Pass URL/Link value to parameters to override DOM href property #960

Open Chijioke11 opened 7 years ago

Chijioke11 commented 7 years ago

Hi, am trying to override the href value on the default href value, so i can pass another element property to the magnificPopup call.

Here is an example

<a href='#' onClick=rolla("device_dialog.php?id=$Device_id") title='View Full Data' class='popup-webcam'>some button

function rolla(redirect) { $('a.popup-webcam').magnificPopup({ href: redirect, //pass the value here or replace 'a.popup-webcam' with the value disableOn: 700, type: 'iframe', mainClass: 'mfp-fade', removalDelay: 160, preloader: false, fixedContentPos: false }); }