Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5
  1. #1
    New Coder
    Join Date
    Sep 2009
    Posts
    73
    Thanks
    5
    Thanked 9 Times in 9 Posts

    Question Why Script Conflict?

    Can anybody tell me why this inline script below would cause the second script/code to cease functioning? - When I remove the first block of code, the second one executes as it should with no problems... i don't get it. Also - I am not a java script programer, I try not to use them and I understand just enough about it to make me dangerous to myself. Thanks


    Code:
    <script src="http://www.jotform.com/min/g=feedback" type="text/javascript">
    new JotformFeedback({
    formId:'13483303613',
    base:'http://www.jotform.com/',
    windowTitle:'Contact Us',
    background:'#544FD1',
    fontColor:'#FFFFFF',
    type:2,
    height:500,
    width:460
    });
    </script>
    <a class="lightbox-13483303613 navb" style="cursor:pointer;color:blue;text-decoration:underline;"><span>&nbsp;</span></a>
    Second code set:
    <body onload="slideSwitch();">
    Code:
    function slideSwitch() {
        var $active = $('#slideshow DIV.active');
    
        if ( $active.length == 0 ) $active = $('#slideshow DIV:last');
    
        // use this to pull the divs in the order they appear in the markup
        var $next =  $active.next().length ? $active.next()
            : $('#slideshow DIV:first');
    
        // uncomment below to pull the divs randomly
        // var $sibs  = $active.siblings();
        // var rndNum = Math.floor(Math.random() * $sibs.length );
        // var $next  = $( $sibs[ rndNum ] );
    
    
        $active.addClass('last-active');
    
        $next.css({opacity: 0.0})
            .addClass('active')
            .animate({opacity: 1.0}, 1000, function() {
                $active.removeClass('active last-active');
            });
    }
    
    $(function() {
        setInterval( "slideSwitch()", 9000 );
    });
    
    // End of Slideshow fade

  • #2
    Senior Coder
    Join Date
    Jan 2011
    Location
    Missouri
    Posts
    4,092
    Thanks
    23
    Thanked 593 Times in 592 Posts
    ARCLite Studio you come here a lot so this is FYI. We javascript programmer don't always know what's going on in jquery. Some do, some don't. This is jquery not javascript. You may get faster answer posting in JavaScript frameworks, a sub form of this.
    Sorry I could not help. If you get nothing by end of day repost in other form.
    Sun....

  • #3
    The fat guy next door VIPStephan's Avatar
    Join Date
    Jan 2006
    Location
    Halle (Saale), Germany
    Posts
    8,629
    Thanks
    6
    Thanked 1,002 Times in 975 Posts
    Moved accordingly.

  • #4
    New Coder
    Join Date
    Sep 2009
    Posts
    73
    Thanks
    5
    Thanked 9 Times in 9 Posts

    Oops.. sorry bout that

    My apologize guys, Honestly I wasn't aware of the difference (Thats why i'm not a java programmer) - But in any case, If I place a post in the wrong section now or in the future its not on purpose, let me know and i'll move it.

    Thanks

  • #5
    The fat guy next door VIPStephan's Avatar
    Join Date
    Jan 2006
    Location
    Halle (Saale), Germany
    Posts
    8,629
    Thanks
    6
    Thanked 1,002 Times in 975 Posts
    Actually sunfighter wasn’t quite correct: jQuery is JavaScript but it’s not “raw” JS, it’s nicely packaged functions (a. k. a. “framework”) for easy working. But since a JS framework implements a different way of writing things one has to familiarize oneself with the special syntax etc. And the purist JS programmers that never need a JS framework to achieve what they want don’t necessarily know these specifics, that’s why they might not be able to help with this.

    And by the way: You cannot move a thread yourself here. Once posted in the wrong section the only thing you can (and should) do is contact a moderator or report your own post and ask for it to be moved.


  •  

    Posting Permissions

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