Would be good to see live example to understand what you mean
var myPhotoBrowserPopupDark = myApp.photoBrowser({ photos: photosBrowser, theme: 'dark', toolbarTemplate: '<div class="toolbar tabbar" id="divPhoto"><div class="toolbar-inner"><a href="#" style="color:#ffffff" id="photoLikes" value="2" class="link" onclick="photoLike();">Like</a><a href="sw_photoComments.html" onclick="getPhotoComment()" style="color:#ffffff" class="link" >Comment</a><a href="#" onclick="sharePhoto()" style="color:#ffffff" class="link">Share</a></div></div>', navbarTemplate:'<div class="navbar"><div class="navbar-inner"><div class="left sliding"><a href="#" class="link close-popup photo-browser-close-link {{#unless backLinkText}}icon-only{{/unless}} {{js "this.type === \'page\' ? \'back\' : \'\'"}}"><i id="photoclick" class="icon icon-back {{iconsColorClass}}"></i>{{#if backLinkText}}<span>{{backLinkText}}</span>{{/if}}</a></div><div class="center sliding"><span class="photo-browser-current"></span><span class="photo-browser-of">{{ofText}}</span><span class="photo-browser-total"></span></div><div class="right" id="likescomments" style="padding-right: 5px;display:none"><h4><span id="likeNo">Likes: </span><span id="photoNoOfLikes"></span> | <span id="commentNo">Comments: </span><span id="photoNoOfComments"></span></h4></div></div></div>', type: 'popup', lazyLoading: 'true', lazyLoadingInPrevNext: 'true', zoom: 'false', //maxZoom:'3', initialSlide: initialSlideNo, toolbar: true, navbar:true, zoom: true, onSlideChangeStart(myPhotoBrowserPopupDark) { var indexNo = $(".photo-browser-current").text(); var id = document.getElementById(indexNo).getAttribute('value'); if(visitorId) { getLikeStat(id); } getLikeComments(id); }, onOpen(myPhotoBrowserPopupDark) { var target = myPhotoBrowserPopupDark.params.loop ? myPhotoBrowserPopupDark.swiper.slides : myPhotoBrowserPopupDark.slides; target.each(function( index ) { var hammertime = new Hammer(this); hammertime.get('pinch').set({ enable: true }); hammertime.on( 'pinchstart', myPhotoBrowserPopupDark.onSlideGestureStart ); hammertime.on( 'pinchmove', myPhotoBrowserPopupDark.onSlideGestureChange ); hammertime.on( 'pinchend', myPhotoBrowserPopupDark.onSlideGestureEnd ); }); }); myPhotoBrowserPopupDark.open(); } when i click on the comment button, the comment page appear's on the back of the photo browser and the photo browser does not vanish..
Just add `myPhotoBrowserPopupDark.close()` to your onClick handler function for this button
I guess you should put it inside `getPhotoComment` function
i just now wrote myPhotobrowserPopupDark.close() in the getPhotoComment function.it shows the error like ReferenceError: myPhotoBrowserPopupDark is not defined..please help
Then make sure you call and define them in same scope
can u suggest me how to do so.. I am new to photo browser..
function getPhotoComment() { myPhotoBrowserPopupDark.close(); }
It is JS basics )) If you defined some variable in one function it won't be accessible within another function. You can try to use `window.myPhotoBrowserPopupDark =` instead of `var myPhotoBrowserPopupDark =`
I did what u said now,it is not showing any error but the photobrowser is not closing..help me
Do you have live link to your app?
yes..
give me ur email id i vil send u the link..
i have just mailed you the link.check it
Ok, you use it as a popup, then just call `myApp.closeModal('.photo-browser-popup');` to close it instead of `myPhotoBrowserPopupDark.close();`
ty vladimir.It helped me alot..
how can i use popup on comment button of photo browser. when i click on the comment button of photo browser a popup modal should open on the photobrowser,but when i try to do so the popup is opening behind the photo browser..suggest me what to do..
Try to increase `z-index` for that popup
myApp.closeModal('.photo-browser-in') not working [Capture111](//muut.com/u/framework7/s1/:framework7:J67N:capture111.png.jpg)