Advanced Search

Results 1 to 5 of 5

Thread: lightbox with simplegallery conflict

  1. #1
    Join Date
    Sep 2013
    Posts
    6
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Question lightbox with simplegallery conflict

    1) Script Title: Simple Controls Gallery and Lightbox image viewer 2.03a

    2) Script URL (on DD): http://www.dynamicdrive.com/dynamici...plegallery.htm and http://www.dynamicdrive.com/dynamicindex4/lightbox2/

    3) Describe problem:

    Hi!

    I am working on a seminary´s web design and I am having a problem using both in the same page lightbox and simplegallery. When I call lightbox in <head> including the lines that follow next, simplegallery does not load the images, it stays in the "loading" stage:
    <link rel="stylesheet" href="lightbox/css/lightbox.css" type="text/css" media="screen" />
    <script type="text/javascript" src="lightbox/js/prototype.js"></script>
    <script type="text/javascript" src="lightbox/js/scriptaculous.js?load=effects"></script>
    <script type="text/javascript" src="lightbox/js/lightbox.js"></script>

    You can watch the error at:
    http://www.estudiovzb.com/sitb/indexError.html

    If I delete the lightbox lines, the pics load normally:
    http://www.estudiovzb.com/sitb/index.html

    I need lightbox to make zoom on the footer map. The lightbox works properly but for some reason I ignore, when I call lightbox together with simplegallery, the images called by simplegallery won´t load.

    Somebody would help me please ?

    Thank you!
    Lorena
    Last edited by Lorenabisio; 09-04-2013 at 05:29 PM. Reason: forgot a script link

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    28,706
    Thanks
    43
    Thanked 3,133 Times in 3,097 Posts
    Blog Entries
    12

    Default

    Use this version of simple gallery (right click and 'Save As'):

    simplegallery.js

    Add this code (highlighted as shown):

    Code:
    <script type="text/javascript" src="http://localhost/demos/simplegallery/simplegallery.js">
    
    /***********************************************
    * Simple Controls Gallery- (c) Dynamic Drive DHTML code library (www.dynamicdrive.com)
    * This notice MUST stay intact for legal use
    * Visit Dynamic Drive at http://www.dynamicdrive.com/ for this script and 100s more
    ***********************************************/
    
    </script>
    <script type="text/javascript">
    jQuery.noConflict();
    </script>
    <script type="text/javascript">
    var mygallery=new simpleGallery({
    	wrapperid: "simplegallery1", //ID of main gallery container,
    	dimensions: [573, 382], //wid . . .
    Change this:

    Code:
    <link rel="stylesheet" href="lightbox/css/lightbox.css" type="text/css" media="screen" />
    <script type="text/javascript" src="lightbox/js/prototype.js"></script>
    <script type="text/javascript" src="lightbox/js/scriptaculous.js?load=effects"></script>
    <script type="text/javascript" src="lightbox/js/lightbox.js"></script>
    to this:

    Code:
    <link rel="stylesheet" href="lightbox/css/lightbox.css" type="text/css" media="screen" />
    <script src="http://ajax.googleapis.com/ajax/libs/prototype/1.7.1.0/prototype.js"></script>
    <script src="http://ajax.googleapis.com/ajax/libs/scriptaculous/1.9.0/scriptaculous.js?load=effects"></script>
    <script type="text/javascript" src="lightbox/js/lightbox.js"></script>
    The browser cache may need to be cleared and/or the page refreshed to see changes.

    There might still be a problem with IE 8 and less. I can't easily test that right now. Once you get it up and working, if there is a problem in IE 8, we can deal with it.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  3. #3
    Join Date
    Sep 2013
    Posts
    6
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default

    Hey John!

    Thank you so much for your soon answer!
    You know, this is the first time I post in Dynamic Drive´s forum, and after I did I read the topic that conflicts between two scripts won´t be answered, so I kept googling and I found a similar post also answered by you (http://www.dynamicdrive.com/forums/s...-2-03a-scripts). I started testing and was almost done when I received your answer, so I made kind of a mix between the two and the scripts are working together! Also in IE8 !

    I have one last question: at first, Lightbox layed under Simplegallery, I changed z-index and it is almost done. The thing is that the pics on simplegallery don´t get the opacity given to the rest of the background. Have you got any trick to get the pics faded the same as the background?

    Same link: http://www.estudiovzb.com/sitb/indexError.html

  4. #4
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    28,706
    Thanks
    43
    Thanked 3,133 Times in 3,097 Posts
    Blog Entries
    12

    Default

    Using a text only editor like NotePad, in the estudiovzb.com/sitb/lightbox2.04a/css/lightbox.css file (around line #27) boost the z-index for the overlay as shown (red):

    Code:
    #overlay{ position: absolute; top: 0; left: 0; z-index: 1090; min-width: 100%; height: 500px; background-color: #000; }
    The browser cache may need to be cleared and/or the page refreshed to see changes.

    And yes, you were right to use Lightbox 2.04a to overcome the problem in IE 8. The only other alternative would be to use a different Lightbox script, like one written for jQuery, in which case it would have to be modified in order to allow for linked captions. I have such a modification for SlimBox. See:

    http://www.dynamicdrive.com/forums/e...d-SlimBox-Good

    for details.

    But, as long as things are working for you now, there's no pressing need to change. However, by using a jQuery Lightbox, you can use just one copy of jQuery for the page and need no prototype.js or scriptaculous.js scripts.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  5. #5
    Join Date
    Sep 2013
    Posts
    6
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default

    Thank you sooooo much!! Now it is working excellent. I am so very gratefull!
    Have a nice day !!

Similar Threads

  1. Lightbox , jquery.min.js Conflict
    By Monclee in forum Dynamic Drive scripts help
    Replies: 6
    Last Post: 03-06-2012, 04:57 AM
  2. simplegallery and colorbox conflict
    By derekmyhome in forum Dynamic Drive scripts help
    Replies: 2
    Last Post: 08-20-2009, 07:50 AM
  3. Conflict with DD Lightbox & Nav Menu
    By Katie F in forum Dynamic Drive scripts help
    Replies: 0
    Last Post: 07-30-2009, 07:01 PM
  4. Conflict between Lightbox 2 and DD Smoothmenu
    By AlShack in forum Dynamic Drive scripts help
    Replies: 1
    Last Post: 04-23-2009, 08:48 PM
  5. Lightbox and another script conflict
    By fastsol in forum Dynamic Drive scripts help
    Replies: 3
    Last Post: 01-13-2009, 04:03 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •