Go Back   CodingForums.com > :: Client side development > JavaScript programming > JavaScript frameworks

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 12-15-2011, 06:31 PM   PM User | #1
ARCLite Studio
New Coder

 
Join Date: Sep 2009
Posts: 73
Thanks: 5
Thanked 9 Times in 9 Posts
ARCLite Studio is an unknown quantity at this point
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
ARCLite Studio is offline   Reply With Quote
Old 12-15-2011, 08:25 PM   PM User | #2
sunfighter
Senior Coder

 
Join Date: Jan 2011
Location: Missouri
Posts: 2,376
Thanks: 18
Thanked 350 Times in 349 Posts
sunfighter is on a distinguished road
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....
sunfighter is offline   Reply With Quote
Old 12-15-2011, 10:12 PM   PM User | #3
VIPStephan
The fat guy next door


 
VIPStephan's Avatar
 
Join Date: Jan 2006
Location: Halle (Saale), Germany
Posts: 7,595
Thanks: 5
Thanked 865 Times in 842 Posts
VIPStephan is a jewel in the roughVIPStephan is a jewel in the roughVIPStephan is a jewel in the rough
Moved accordingly.
__________________
Don’t click this link!
VIPStephan is online now   Reply With Quote
Old 12-19-2011, 11:30 PM   PM User | #4
ARCLite Studio
New Coder

 
Join Date: Sep 2009
Posts: 73
Thanks: 5
Thanked 9 Times in 9 Posts
ARCLite Studio is an unknown quantity at this point
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
ARCLite Studio is offline   Reply With Quote
Old 12-19-2011, 11:37 PM   PM User | #5
VIPStephan
The fat guy next door


 
VIPStephan's Avatar
 
Join Date: Jan 2006
Location: Halle (Saale), Germany
Posts: 7,595
Thanks: 5
Thanked 865 Times in 842 Posts
VIPStephan is a jewel in the roughVIPStephan is a jewel in the roughVIPStephan is a jewel in the rough
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.
__________________
Don’t click this link!
VIPStephan is online now   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 12:30 PM.


Advertisement
Log in to turn off these ads.