samirkumardas / skdslider Goto Github PK
View Code? Open in Web Editor NEWJquery full width image slider
License: MIT License
Jquery full width image slider
License: MIT License
The aspect ratio wrong on some pages loads, sometimes it takes several refreshes to get it to be right. Here is the test page: http://www.danadadental.com/dev/
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.
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!!!
Hi ,
On Ipad and Mobiles; While touch and swipe the page to top on slider there is only change in slider images. The page is not scrolling.
Anyone have the answer?
Hi,
It would be gr8, if you can u register ur package with bower
, npm
and yarn
package manager(s). As this guy has done:
https://github.com/putheakhem/skdslider/blob/master/bower.json
For, creating bower package, here is the docs link
https://bower.io/docs/creating-packages/
thanks
dk
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.
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.
Slider it self will load only after page refresh
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.