GithubHelp home page GithubHelp logo

samirkumardas / skdslider Goto Github PK

View Code? Open in Web Editor NEW
19.0 3.0 8.0 3.67 MB

Jquery full width image slider

License: MIT License

CSS 11.14% JavaScript 51.04% HTML 37.82%
javascript css javascript-slider javascript-carousel full-width-slider

skdslider's Introduction

Hi there ๐Ÿ‘‹

Zlienqwe's github stats

Top Langs

skdslider's People

Contributors

ricardo2s avatar samirkumardas avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

skdslider's Issues

Make touch config optional (true/false)

I see that there is a config option, but not the provision to make it true or false. I added touch: false to the config options, but I also had to comment out the config.touch variable on line 35.

lLider dissapears!

Hello Samirkumardas,
Love the slider, but for some reason it is there one minute and then disappears. I might have something somewhere it doesn't like as I am just starting this new site and some old code or css might be in there. Can you please advise?

Thank you!!!

slider doesn't slide

Hello Samir. When I load the scripts and all the dependencies, all the images load at the same time. Can you look at the code and see if I missed something? Thank you. I am creating a WordPress theme and the code is as follows:
function.php

function slider() {
    $args = array(
        'post_type' => 'slider',
        'orderby' => 'menu_order',
        'order' => 'ASC',
        'posts_per_page' => 4
    );
    $slider = new WP_Query($args);
    echo "<div class='slide'>";
    while($slider->have_posts()): $slider->the_post();
        //echo "<div class="slide">";
        $link = get_field('link');
        echo "<a href='$link'>";
        the_post_thumbnail('slider');
        echo "</a>";
        //echo "</div>";
    endwhile; wp_reset_postdata();
         echo "</div>";

}
add_action('slider_index', 'slider');

sript.js

$('#slider').skdslider({
		    slideSelector: '.slide',
		    delay:5000,
		    animationSpeed: 2000,
		    showNextPrev:false,
		    showPlayButton:false,
		    autoSlide:true,
		    animationType:'sliding'
		});

header.php

<?php if(is_home() && get_option('page_for_posts') ) : ?>
<?php $featured = wp_get_attachment_image_src( get_post_thumbnail_id(get_option('page_for_posts')), 'full' ); ?>
<?php $featured = $featured[0]; ?>
	<div class="featuredImage" style="background-image:url(<?php echo $featured ?>);"></div>
<?php elseif (is_front_page()): ?>
	<div class="slider" id="slider">
<?php //functions.php:12 ?>
<?php do_action('slider_index'); ?>
	</div>
<?php  else : ?>
<?php $featured = wp_get_attachment_image_src( get_post_thumbnail_id(), 'full' ); ?>
<?php $featured = $featured[0]; ?>
	<div class="featuredImage" style="background-image:url(<?php echo $featured ?>);"></div>
<?php endif; ?>

if (function_exists('add_theme_support')) {
    // Add Menu Support
    add_theme_support('menus');
// Add Thumbnail Theme Support
    add_theme_support('post-thumbnails');
    add_image_size('medium', 350, 250, true); // Medium Thumbnail
    add_image_size('custom-size', 700, 200, true); // Custom Thumbnail Size call using the_post_thumbnail('custom-size');
    add_image_size('featuredTour', 730, 390, true);
    add_image_size('featuredBlog', 1280, 444, true);
    add_image_size('slider', 1500, 500, true);
}

function html5blank_header_scripts()
{
    if ($GLOBALS['pagenow'] != 'wp-login.php' && !is_admin()) {

        wp_enqueue_script('jquery');
        wp_register_script('skdsliderjs', get_template_directory_uri() . '/js/skdslider.js', array(), ''); // SkdSlider
        wp_enqueue_script('skdsliderjs'); // Enqueue it!
}

function html5blank_styles()
{
wp_register_style('skdslidercss', get_template_directory_uri() . '/css/skdslider.css', array(), '', 'all');
    wp_enqueue_style('skdslidercss'); // Enqueue it!
}

The images are in the CSS folder as well as the sdkslider.css file and the js file in its own folder.
Thank you for looking into this.

Slider browser resize issue in different devices- Demo1

When I open this slider in other devices like tab, mob, laptop. When I load the first time skdslider height not automatically taken. The default height applying like height: 450px; . When I refresh the page the auto height working from js. the demo also have the same issue.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.