WordPress.org

Ready to get started?Download WordPress

Forums

Slider is not working (3 posts)

  1. Vishal
    Member
    Posted 4 months ago #

    This coding includes in my header file.
    Please tell me where exactly I am making mistake?

    <!DOCTYPE HTML>
    <html><head>
    <title><?php wp_title(); ?></title>
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

    <link rel="stylesheet" type="text/css" media="all" href="<?php bloginfo( 'stylesheet_url' ); ?>" >
    <link href="<?php bloginfo('stylesheet_directory'); ?>/css/slider.css" rel="stylesheet" type="text/css" media="all"/>
    <link href='http://fonts.googleapis.com/css?family=Open+Sans:300,600,700,400' rel='stylesheet' type='text/css'>
    <link href='http://fonts.googleapis.com/css?family=Raleway:100,200,300,400,500,600,700,800,900' rel='stylesheet' type='text/css'>
    <script type="text/javascript" src="<?php bloginfo('stylesheet_directory'); ?>/js/jquery.min.js"></script>
    <script src="<?php bloginfo('stylesheet_directory'); ?>/js/jquery.easydropdown.js"></script>
    <script type="text/javascript" src="<?php bloginfo('stylesheet_directory'); ?>/js/script.js"></script>
    <script type="text/javascript" src="<?php bloginfo('stylesheet_directory'); ?>/js/jquery.nivo.slider.js"></script>
    <script src="<?php bloginfo('stylesheet_directory'); ?>/js/jquery.magnific-popup.js" type="text/javascript"></script>
    <link href="<?php bloginfo('stylesheet_directory'); ?>/css/magnific-popup.css" rel="stylesheet" type="text/css">

    <script type="text/javascript">
    $(window).load(function() {
    $('#slider').nivoSlider();
    });
    </script>

    <?php wp_head(); ?>

    </head>

  2. Dave Naylor
    Member
    Posted 4 months ago #

    WordPress loads jQuery in NoConflict mode, so you need to add your code like this:

    <script type="text/javascript">
    
    jQuery(document).ready(function($) {
    
           // Your stuff   
    
    });
    </script>
  3. Vishal
    Member
    Posted 4 months ago #

    But earlier it was working.
    And when I switched to default theme and again switched to this one it was not working properly.

Reply

You must log in to post.

About this Topic

Tags

No tags yet.