Question about modal box libraries


These below are two libraries for modal boxes:

The second one is based on the first one, and the second one permits operate correctly an image cropper like this while the first one doesnt…

My question: what permits placing the image cropper in the second one? Because the second one supports javascript ?



Hi Javi,

Not sure I understand the question correctly,
I couldn’t find anything in either lightbox2 or lytebox that handled image cropping.

If you are saying that you’ve been able to combine lytebox and the cropping script but not the first we’d need to see your example - what is the final effect you are trying to create?

Because the second one supports javascript ?

All three examples you posted ARE javascript. Some scripts can work well together - others can’t - you should look into the source code of the examples and figure out what they are doing and why.

Hope it helps,

I know that :).

What i say is: why lightbox2 modal boxes dont show inside of them correctly (the cross that should be showed when you put the mouse cursor on the image) the image cropper i say, and lytebox modal boxes can do it correctly?


Sorry, I have no idea what you are asking.

(the cross that should be showed when you put the mouse cursor on the image)

The mouse cursor?
This appears the same for me in both lightbox scripts.

So, have you tried creating modal boxes with both lightbox scripts (lightbox and lytebox) and the image cropper is working for you with both??


You’ve really lost me.

It sounds like you are trying to combine Lightbox and the Image cropping script. You shouldn’t expect to be able to mash different scripts together and expect them to work. Some scripts work well together out-of-the-box, others need some hacking.

Again, what is the final effect you are trying to create?
My guess is to be able to click on an image - open in a lightbox and then be able to select parts of the image - and then…

We need an example.

What i just wanted to know is: what drives correctly the image cropper inside the modal box of lytebox library.

If you can’t put together an example of what you are working with I won’t make an effort to try and help you either.

The nature of those scripts generally work in the same way - when the page loads they take a dom element in the page and extend it in some way (add extra elements, setup events etc) because of this if unexpected elements are added the scripts may not be able to find the correct ones or the events could clash or do contradicting things.

Don’t expect scripts like these to work well together.

This was said in relation to using frameworks but I think it applies to these scripts also.
“You should only use a framework if you have read it, understand it, agree with it and couldn’t achieve the same thing in your best day of coding.”