bPopup is a lightweight jQuery modal popup plugin (only 1.34KB gzipped). It doesn't create or style your popup but provides you with all the logic like centering, modal overlay, events and more. It gives you a lot of opportunities to customize so it will fit your needs.
var url = rainbow.current.model.url + "/" + row[idName] + '?_mode=inline&bust=' + (new Date()).getTime(); var a = $('<a href="#">点击查看</a>'); $img = $('<div id="div-bPopup"></div>').attr('max-width','450px').attr('max-height','450px'); a.on('click',function(e){ e.preventDefault(); $img.bPopup({ content:'image', loadUrl:url, zIndex: 10000, modalClose: true }); });
The above is my code. When a's 'clikc' event triggered, the picture shows. But the question is that the close button x doesn't show. What is wrong with it. tks!
var url = rainbow.current.model.url + "/" + row[idName] + '?_mode=inline&bust=' + (new Date()).getTime(); var a = $('<a href="#">点击查看</a>'); $img = $('<div id="div-bPopup"></div>').attr('max-width','450px').attr('max-height','450px'); a.on('click',function(e){ e.preventDefault(); $img.bPopup({ content:'image', loadUrl:url, zIndex: 10000, modalClose: true }); });
The above is my code. When a's 'clikc' event triggered, the picture shows. But the question is that the close button x doesn't show. What is wrong with it. tks!