Help with JQuery function syntax and debugging
I am having a few issues with my JQuery functions. Below is the code: In Dreamweaver Line 14 is highlighted red as an error. I can't spot the error. and my $PopUp modal window doesn't fire on the last function. The HTML for that is below the JS.
Also for multiple JS functions on a page, can/should I just use one <script> and $(document).ready (function() ?
- <script>
- $(document).ready (function(){
- $(".status").click(function() {
- $("#slider").slideToggle( "slow" );
- })
-
- });
- </script>
- <script>
- $(document).ready(function(){
-
- $('.featured h2').delay(2000).css('opacity:', '0').fadeTo(3500, 1,'swing')
- });
- </script>
- <script>
- $(document).ready(function(){
-
- $(".social-circle li a").hover(
- // Mouse Over
- function(){
-
-
- $(this).css({opacity:.5},1000);
- },
- // Mouse Out
- function(){
- $(this).css({opacity:1},1000);
- })
- });
- </script>
- <script>
- // Semicolon (;) to ensure closing of earlier scripting
- // Encapsulation
- // $ is assigned to jQuery
- ;(function($) {
-
- // DOM Ready
- $(function() {
-
- // Binding a click event
- // From jQuery v.1.7.0 use .on() instead of .bind()
- $('.PopUp').bind('click', function(e) {
-
- // Prevents the default action to be triggered.
- e.preventDefault();
-
- // Triggering bPopup when click event is fired
- $('.PopUp').bPopup({
- speed: 650,
- transition: 'slideIn',
- transitionClose: 'slideBack'
- });
-
- });
-
- });
-
- })(jQuery);
- </script>
- <p>This is supposed to PopUp when clicked <a class="PopUp" href="#" title="PopUp">PopUp</a></p>