SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Enthusiast
    Join Date
    Apr 2006
    Posts
    73
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    jQuery/scriptaculous lightbox issues

    Hi guys.

    I've got a couple of questions.

    Firstly, is there a successful way to deploy jQuery and Scriptaculous within the same page/site? I'm working on a site where both are required but only the Scriptaculous functions work. Is there some sort of fix or workaround for this?

    Secondly. (although may not be required if the above is possible!!) I've got a jQuery plugin that works by targeting all images with a given ID (so PRODUCTIMAGE_1 below). However the href for the images is not a direct <a href="example.jpg">.... rather a <a href="javascript:viewimagewindowexample();> How can I use the jQuery to target a image that is itself controlled by Javascript?

    I may add that in this instance it is impossible to change the href method or indeed attach other IDs or Classes.


    An example of the jQuery call for the image:

    Code:
    <script type="text/javascript">
        $(function() {
            $('a img#PRODUCTIMAGE_1').lightBox();
        });
        </script>

    Thanks for any help you might be able to give me!

  2. #2
    Unobtrusively zen silver trophybronze trophy
    paul_wilkins's Avatar
    Join Date
    Jan 2007
    Location
    Christchurch, New Zealand
    Posts
    14,684
    Mentioned
    99 Post(s)
    Tagged
    4 Thread(s)
    We have an answer for that in our tips section. It's the jQuery noConflict post.
    Programming Group Advisor
    Reference: JavaScript, Quirksmode Validate: HTML Validation, JSLint
    Car is to Carpet as Java is to JavaScript

  3. #3
    SitePoint Enthusiast
    Join Date
    Apr 2006
    Posts
    73
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You sir are a legend. Solved the problem straight away. Thank you so, so much!


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
  •