lightbox2

Get lightbox 2 working in Angular 2?

做~自己de王妃 提交于 2019-12-06 03:42:47
问题 I can't get lightbox 2 to work in Angular 2. I set it up as described in the documentation, but I always get the error "Uncaught TypeError: this.$lightbox.css(...).fadeIn is not a function". I can't find any example code getting this working. 回答1: If you are using Angular CLI, do it like you import any other external/jQuery libs. So: npm install --save lightbox2 add styles to angular-cli.json: "styles": [ "styles.css", "../node_modules/lightbox2/dist/css/lightbox.min.css" ], add script to

Lightbox 2.51 - how to move close button and image number to the top?

给你一囗甜甜゛ 提交于 2019-12-04 16:53:15
I'm using Lightbox 2.51 and I can't find a solution to move lb-dataContainer with close button and current image number etc to the top I only found solutions for the old versions. Code can be found here: http://lokeshdhakar.com/projects/lightbox2/releases/lightbox2.51.zip The solution is to change outer container with data container: Lightbox.prototype.build = function() { var $lightbox, _this = this; $("<div>", {id: 'lightboxOverlay'}).after ( $('<div/>', {id: 'lightbox'} ).append( $('<div/>', { "class": 'lb-dataContainer' }).append($('<div/>', { "class": 'lb-data' }).append($('<div/>', {

Get lightbox 2 working in Angular 2?

故事扮演 提交于 2019-12-04 09:02:45
I can't get lightbox 2 to work in Angular 2. I set it up as described in the documentation, but I always get the error "Uncaught TypeError: this.$lightbox.css(...).fadeIn is not a function". I can't find any example code getting this working. If you are using Angular CLI, do it like you import any other external/jQuery libs. So: npm install --save lightbox2 add styles to angular-cli.json: "styles": [ "styles.css", "../node_modules/lightbox2/dist/css/lightbox.min.css" ], add script to angular-cli.json "scripts": [ "../node_modules/jquery/dist/jquery.js", "../node_modules/lightbox2/dist/js

Lightbox overlay not displaying on Chrome but works well on Chrome Canary

爷,独闯天下 提交于 2019-12-04 08:05:58
I've got some issues on Lightbox Overlay which it displays perfectly on Chrome Canary, Safari, Firefox and IE. Except for Chrome (version 33). Screenshots: ** Lightbox on any browser except Chrome : http://awesomescreenshot.com/0952i236a2 ** Lightbox on Chrome : http://awesomescreenshot.com/0522i2378a Another weird thing is, the Gray black overlay will popup IF I resized my browser Hovered and inspected an HTML element on the page Any help would be appreciated. Thanks!. can you make the overlay styles set to position:fixed; width:100%; height:100%; top:0; left:0; worth a shot overwriting the

lightbox 2: how to add dynamically images via javascript

那年仲夏 提交于 2019-12-04 05:12:49
问题 I'm having trouble attempting to dynamically add images , since lightbox2 (by lokesh dakar) is initialized after document load by existent html coded images and it doesn't parse the document anymore after the first time. If i try to add new images with javascript (appending them in the body for example) they are not added to the lighbox groups. Documentation in official website doesn't seems to describe any scripted method Anyone with experience can help me? solution with jquery are really

What is the logic of Lightbox 2 on where to position the popup?

北城以北 提交于 2019-12-03 21:43:26
What is the logic of Lightbox 2 on where to position the popup? It seems that when using Firefox or Chrome it shows up in different places on different pages. Is there any setting to have it show at the same height on every page for consistency? What is the CSS or logic it's using to determine positioning? In what way does it display on different places, what is your desired behaviour, and can you give a sample page? Here is how the script itself calculates the top position of the popup (lightbox v2.04, zip download, js/lightbox.js, lines 229ff): // calculate top and left offset for the

lightbox 2: how to add dynamically images via javascript

a 夏天 提交于 2019-12-02 04:44:55
I'm having trouble attempting to dynamically add images , since lightbox2 (by lokesh dakar) is initialized after document load by existent html coded images and it doesn't parse the document anymore after the first time. If i try to add new images with javascript (appending them in the body for example) they are not added to the lighbox groups. Documentation in official website doesn't seems to describe any scripted method Anyone with experience can help me? solution with jquery are really welcome, but i can handle well vanilla js too. Code sample: HTML <body> <div id="container"> <a href=