ion-slides click not proper working when slides last index move to first index - ionic-framework

it's work perfect when slides first index to last but when auto loop go to last index to first index click property is not working.
<ion-slides *ngIf="slides != null" autoplay="3000" loop="true" speed="800" >
<ion-slide *ngFor="let slide of slides" >
<img [src]="slide.BannerImage">
<div class="con-box">
<h2>{{slide.BannerName}}</h2>
<br/>
<button ion-button color="btn" (click)="fnGotoNewArrivalList(slide.CollectionID,slide.BannerName)">Order Now</button>
</div>
</ion-slide>
</ion-slides>

#jatin devani please try this code..
replace ion-slides in place use swiper
html
<!-- Swiper -->
<swiper class="swiper-container" [config]="config" #usefulSwiper>
<div class="swiper-container">
<div class="swiper-wrapper">
<div class="swiper-slide">Slide 1</div>
<div class="swiper-slide">Slide 2</div>
<div class="swiper-slide">Slide 3</div>
<div class="swiper-slide">Slide 4</div>
<div class="swiper-slide">Slide 5</div>
<div class="swiper-slide">Slide 6</div>
<div class="swiper-slide">Slide 7</div>
<div class="swiper-slide">Slide 8</div>
<div class="swiper-slide">Slide 9</div>
<div class="swiper-slide">Slide 10</div>
</div>
<!-- Add Pagination -->
<div class="swiper-pagination"></div>
<!-- Add Arrows -->
<div class="swiper-button-next"></div>
<div class="swiper-button-prev"></div>
</div>
</swiper>
index.html
<script src="assets/js/swiper.jquery.min.js"></script>
<script src="assets/js/swiper.min.js"></script>
.ts file
config:any;
this.config = {
paginationClickable: true,
spaceBetween: 30,
centeredSlides: true,
autoplay: 2500,
autoplayDisableOnInteraction: false,
initialSlide : 0,
slidesPerView: 1,
// paginationType: 'progress',
// pagination: '.swiper-pagination',
nextButton: '.swiper-button-next',
prevButton: '.swiper-button-prev',
};
css file
html, body {
position: relative;
height: 100%;
}
body {
background: #eee;
font-family: Helvetica Neue, Helvetica, Arial, sans-serif;
font-size: 14px;
color:#000;
margin: 0;
padding: 0;
}
.swiper-container {
width: 100%;
height: 100%;
}
.swiper-slide {
text-align: center;
font-size: 18px;
background: #fff;
/* Center slide text vertically */
display: -webkit-box;
display: -ms-flexbox;
display: -webkit-flex;
display: flex;
-webkit-box-pack: center;
-ms-flex-pack: center;
-webkit-justify-content: center;
justify-content: center;
-webkit-box-align: center;
-ms-flex-align: center;
-webkit-align-items: center;
align-items: center;
}

Related

html/css review slider works on codepen, but not on actual website

I built out a review slider to display various reviews from customers across all of our marketplaces, it works great on codepen, but not so much on the website. Im sure im missing something simple, but can't figure it out.
Platform: Magento 2.3.5 P2
How the slider appears on the website
https://codepen.io/hqqh/pen/VwpzGYV
.slider {
background: linear-gradient(90deg, rgba(235, 235, 235, 1) 0%, rgba(255, 255, 255, 1) 50%, rgba(235, 235, 235, 1) 100%);
box-shadow: 0 10px 20px -5px rgba(0, 0, 0, .125);
height: 250px;
margin: auto;
overflow: hidden;
position: relative;
width: 1280px;
padding-top: 30px;
padding-bottom: 10px;
border-radius: 5px;
}
.slider::before,
.slider::after {
background: linear-gradient(to right, rgba(255, 255, 255, 1) 0%, rgba(255, 255, 255, 0) 50%);
content: "";
height: 290px;
position: absolute;
width: 200px;
z-index: 2;
}
.slider::before {
left: 0;
top: 0;
}
.slider::after {
right: 0;
top: 0;
transform: rotateZ(180deg);
}
#keyframes scroll {
0% {
transform: translateX(0);
}
100% {
transform: translateX(calc(-250px * 7))
}
}
.slide-track {
animation: scroll 60s linear infinite;
display: flex;
width: calc(250px * 14);
}
.slide {
height: 214px;
width: 350px;
}
.review-card {
background: white;
margin: 10px;
height: 195px;
padding: 7px;
box-shadow: 0 10px 20px -5px rgba(0, 0, 0, .125);
border-radius: 10px;
}
.review-card-header {
height: 80px;
}
.review-card p {
font-family: 'Roboto Condensed', sans-serif;
}
.ebay-logo,
.az-logo {
position: relative;
top: -40px;
left: -40px;
width: 150px;
height: 150px;
}
.review-content {
padding: 5px;
height: 60px;
position: relative;
z-index: 2;
margin-bottom: 0px;
bottom: 18px;
}
.review-content::before,
.review-content::after {
font-family: FontAwesome;
padding: 5px;
color: #d3d3d3;
margin: 5px;
}
.review-content::before {
content: "\f10d";
}
.review-content::after {
content: "\f10e";
}
<link rel="stylesheet" type="text/css" media="all"
href="https://maxcdn.bootstrapcdn.com/font-awesome/latest/css/font-awesome.min.css" />
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto+Condensed:400" />
<link rel="stylesheet" href="//use.fontawesome.com/releases/v5.0.7/css/all.css">
<meta name="viewport" content="width=device-width, initial-scale=1 user-scalable=no">
<link rel="preconnect" href="https://fonts.gstatic.com">
<link href="https://fonts.googleapis.com/css2?family=Oswald:wght#600&display=swap" rel="stylesheet">
<link href="https://fonts.googleapis.com/css2?family=Roboto&display=swap" rel="stylesheet">
</head>
<body>
<div class="col-lg-12">
<div class="container">
<div class="row justify-content-center">
<h2 style="text-align: center; font-size: 42px; text-transform: uppercase; font-family: oswald;">Over
1,000,000 Happy Customers Served</h2>
<h4 style="text-align: center; font-family: Roboto;">These are just a handful of the reviews we have
received recently across all of our marketplaces </h4>
<div class="slider">
<div class="slide-track">
<div class="slide ">
<div class="review-card">
<div class="col-lg-3 review-card-header">
<div class="container">
<div class="row">
<img class="ebay-logo"
src="https://integrationmaverick.net/offsite-images/eb-logo.png" border="0">
</div>
</div>
</div>
<div class="col-lg-3 review-card-body">
<div class="container">
<div class="row">
<p class="review-content">Arrived quicker than expected, was very very well
packaged, paint was excellent. Would highly recommend. Thank You</p>
</div>
<div class="row">
<p style="float: right; margin-top: 0px; color: #c3c3c3">-eBay Customer 2021</p>
</div>
</div>
</div>
</div>
</div>
<div class="slide ">
<div class="review-card">
<div class="col-lg-3 review-card-header">
<div class="container">
<div class="row">
<img class="az-logo"
src="https://integrationmaverick.net/offsite-images/az-logo.png" border="0">
</div>
</div>
</div>
<div class="col-lg-3 review-card-body">
<div class="container">
<div class="row">
<p class="review-content">Couldn’t be happier with the new front bumper cover!!! MBI auto got the paint matched perfectly, and the fit was FANTASTIC! We are thrilled! Last picture is the original bumper cover after my wreck</p>
</div>
<div class="row">
<p style="float: right; margin-top: 0px; color: #c3c3c3">-Amazon Customer 2021</p>
</div>
</div>
</div>
</div>
</div>
<div class="slide ">
<div class="review-card">
<div class="col-lg-3 review-card-header">
<div class="container">
<div class="row">
<img class="az-logo"
src="https://integrationmaverick.net/offsite-images/google-logo.png" border="0">
</div>
</div>
</div>
<div class="col-lg-3 review-card-body">
<div class="container">
<div class="row">
<p class="review-content">I received the bumper I ordered sooner than expected and was pleasantly surprised. It fit just right and paint matched perfectly. I would definitely recommend trying them out for a replacement bumper.</p>
</div>
<div class="row">
<p style="float: right; margin-top: 0px; color: #c3c3c3">-Google Review 2021</p>
</div>
</div>
</div>
</div>
</div>
<div class="slide ">
<div class="review-card">
<div class="col-lg-3 review-card-header">
<div class="container">
<div class="row">
<img class="az-logo"
src="https://integrationmaverick.net/offsite-images/eb-logo.png" border="0">
</div>
</div>
</div>
<div class="col-lg-3 review-card-body">
<div class="container">
<div class="row">
<p class="review-content">Arrived quicker than expected, was very very well
packaged, paint was excellent. Would highly recommend. Thank You</p>
</div>
<div class="row">
<p style="float: right; margin-top: 0px; color: #c3c3c3">-eBay Customer 2021</p>
</div>
</div>
</div>
</div>
</div>
<div class="slide ">
<div class="review-card">
<div class="col-lg-3 review-card-header">
<div class="container">
<div class="row">
<img class="az-logo"
src="https://integrationmaverick.net/offsite-images/az-logo.png" border="0">
</div>
</div>
</div>
<div class="col-lg-3 review-card-body">
<div class="container">
<div class="row">
<p class="review-content">Arrived quicker than expected, was very very well
packaged, paint was excellent. Would highly recommend. Thank You</p>
</div>
<div class="row">
<p style="float: right; margin-top: 0px; color: #c3c3c3">-Amazon Customer 2021</p>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="col-lg-12">
<div class="container">
<div class="row" style="text-align:center;">
<p>Click Here To View More Customer Reviews</p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</body>

Show/hide password with materialize css is crashing responsive input

I'm using a form with materialize css. I have a link with my login project here: http://clients.paulofrutuoso.pt/login.html I want to put a show and hide password in the form. I'm using this example: https://github.com/cloudfour/hideShowPassword
And I have this CSS for the icons
::-ms-reveal,
::-ms-clear {
display: none !important;
}
.hideShowPassword-toggle {
background-color: transparent;
background-image: url('../images/wink.png'); /* fallback */
background-image: url('../images/wink.svg'), none;
background-position: 0 center;
background-repeat: no-repeat;
border: 2px solid transparent;
border-radius: 0.25em;
cursor: pointer;
font-size: 100%;
height: 44px;
margin: 0;
max-height: 100%;
padding: 0;
overflow: 'hidden';
text-indent: -999em;
width: 46px;
-moz-appearance: none;
-webkit-appearance: none;
}
.hideShowPassword-toggle-hide {
background-position: -44px center;
}
.hideShowPassword-toggle:hover,
.hideShowPassword-toggle:focus {
border-color: #0088cc;
outline: transparent;
}
This is the html:
<div class="container clearfix">
<div class="container-app-club">
<div class="row">
<div class="col s5 right-align"> <img class="responsive-img " src="images/palmeiras.png" width="130" height="130"> </div>
<div class="col s2 center-align"><hr class="vertical"/></div>
<div class="col s5 left-align"> <img class="responsive-img " src="images/app-brasao.png" width="130" height="130"> </div>
</div>
</div>
<div class="row">
<form class="col s12">
<div class="row">
<div class="input-field col s12">
<input id="email" type="email" class="validate">
<label class="active" data-success="Campo Obrigatório">E-mail</label>
</div>
</div>
<div class="row">
<div class="input-field col s12">
<input id="password-1" type="password" class="validate">
<label class="active" data-error="Campo Obrigatório">Senha</label>
<div class="form-error">Campo obrigatório</div>
</div>
<div class="col s12 right-align"> Recupere sua senha! </div>
</div>
</form>
</div>
<div class="col s12">
<button class="btn btn-w waves-effect" href="preencher-cpf.html">Login</button>
</div>
<div class="col s12 center-align" style="margin-top:15px;"> Ainda não está registado? Cadastre-se </div>
</div>
And I have this JS in the html:
$('#password-1').hidePassword(true);
The icon is on the right end of the form and it toggles just fine but the size of the input doesn't shows in responsive way. The icon crashes the input responsible design.
Any ideas to solve this?
thank you so much.
Done. I just add this css code:
.hideShowPassword-wrapper{
position: relative;
display: inline-block;
vertical-align: baseline;
width: 100%!important;
}
.hideShowPassword-field{
margin: 0px;
padding-right: 0!important;
}

Modal popover not showing image

The task is to insert a simple modal popover as an alert for clients to be notified of a temporary relocation. On page load, a transparent background appears but the image nor the close button appears.
DATA
<link rel="stylesheet" href="../css/bootstrap.min.css">
<link rel="stylesheet" href="../css/bootstrap-theme.min.css">
<script src="../js/bootstrap-modal.js"></script>
<script src="../js/popover.js"></script>
<script src="../js/jquery-1.12.4.js"></script>
<script src="../js/bootstrap.min.js"></script>
<script type="text/javascript">
$(window).load(function(){
$('#myModal').modal('show');
});
</script>
<style>
.modalDialog {
position: fixed;
font-family: Arial, Helvetica, sans-serif;
top: 0;
right: 0;
bottom: 0;
left: 0;
background: rgba(0,0,0,0.8);
z-index: 99999;
opacity:0;
-webkit-transition: opacity 400ms ease-in;
-moz-transition: opacity 400ms ease-in;
transition: opacity 400ms ease-in;
pointer-events: none;
}
.modalDialog:target {
opacity:1;
pointer-events: auto;
}
.modalContent {
width: 750px;
z-index: 10000;
position: relative;
margin: 10% auto;
padding: 5px 20px 13px 20px;
border-radius: 10px;
background: none;
background: -moz-linear-gradient;
background: -webkit-linear-gradient;
background: -o-linear-gradient;
}
.close {
background: #606061;
color: #FFFFFF;
line-height: 25px;
position: absolute;
right: -12px;
text-align: center;
top: -10px;
width: 24px;
text-decoration: none;
font-weight: bold;
-webkit-border-radius: 12px;
-moz-border-radius: 12px;
border-radius: 12px;
-moz-box-shadow: 1px 1px 3px #000;
-webkit-box-shadow: 1px 1px 3px #000;
box-shadow: 1px 1px 3px #000;
}
</style>
CODE
<div id="myModal" class="modal fade in">
<div class="modalDialog">
<div class="modalContent">
X
<img src="image.jpg" width="750px"/>
</div>
</div>
</div>
This seems like a fairly straightforward task but I cannot seem to resolve this issue by multiple attempts. Your help is greatly appreciated.
I have no idea about popover plugin, but i have created fiddle for this using bootstrap plugin, when the page gets opened modal will be appear with some content (You can replace it by your content).
Sample HTML:
<div class="container">
<h2>Modal Example</h2>
<!-- Trigger the modal with a button -->
<button type="button" class="btn btn-info btn-lg" data-toggle="modal" data-target="#myModal">Open Modal</button>
<!-- Modal -->
<div class="modal fade" id="myModal" role="dialog">
<div class="modal-dialog">
<!-- Modal content-->
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">×</button>
<h4 class="modal-title">Modal Header</h4>
</div>
<div class="modal-body">
<p>Some text in the modal.</p>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
</div>
And JS
$(document).ready(function(){
$("#myModal").modal('show');
});
JSFIDDLE
Note: I did not included popover.js.

Ionic center text vertically and horizontally on screen

I'm trying to vertically align my text on my screen. I've read through the docs on how to do this. But I'm still not having any luck. This is my code:
<div class="row">
<div class="col col-center text-center">
<h4 class="gray">This text is in the center of the screen</h4>
</div>
</div>
HTML
<div class="row">
<div class="col">
<div class="text-center">
<h5 style="text-align: center;">This text is in the center of the screen</h5>
</div>
</div>
</div>
This works on Ionic Framework 3.0.1:
HTML:
<ion-content padding>
<div>
<h4 class="gray">This text is in the center of the screen</h4>
</div>
</ion-content>
SASS:
ion-content {
div {
height: 100%;
width: 100%;
display: flex;
justify-content: center;
align-items: center;
}
}
Try this solution:
1.Add new css styles:
.home .scroll-content {
display: table !important;
width: 100% !important;
height: 100% !important;
margin-top: -50px; /* the height of the centered content */
text-align: center;
}
.home .scroll {
display: table-cell;
vertical-align: middle;
}
2.Apply home class to ion-view:
<ion-view class="home">
demo
How about specify the "height"?
Anyway, centralize your text in horizontal, you can also use align="center".
(To make it clear, I added the color to row and col.)
<div class="row" style="height: 900px; background-color: blue;">
<div class="col col-center" style="background-color: red;>
<h4 class="gray" align="center">This text is in the center of the screen</h4>
</div>
</div>

JSSOR "Error: prototype of 'thumbnavigator' not defined"

The full JavaScript error is:
Timestamp: 6/4/2015 8:52:37 AM
Error: Error: prototype of 'thumbnavigator' not defined.
Source File: http://webanautics.com/invoice/slider-master/js/jssor.js
Line: 69
I have read the other answers to the same question, but the answers don't work for my particular code.
I'm using the tabs-slider example, enter link description here
My Slides Container looks like this:
<!-- Slides Container -->
<div u="slides" style="cursor: move; position: absolute; left: 0px; top: 29px; width: 900px; height: 600px; border: 1px solid gray; -webkit-filter: blur(0px); background-color: #fff; overflow: hidden;">
<div>
<div style="margin: 10px; overflow: hidden; color: #000;">
<?php $week = -1; include("includes/invoice-week-module.php"); ?>
</div>
<div u="thumb">Last Week</div>
</div>
<div>
<div style="margin: 10px; overflow: hidden; color: #000;">
<?php $week = 0; include("includes/invoice-week-module.php"); ?>
</div>
<div u="thumb">This Week</div>
</div>
<div>
<div style="margin: 10px; overflow: hidden; color: #000;">
<?php $week = 1; include("includes/invoice-week-module.php"); ?>
</div>
<div u="thumb">Next Week</div>
</div>
</div>
This is my thumbnavigator div block:
<div u="thumbnavigator" class="jssort12" style="left:0px; top: 0px;">
<!-- Thumbnail Item Skin Begin -->
<div u="slides" style="cursor: default; top: 0px; left: 0px; border-left: 1px solid gray;">
<div u="prototype" class="p">
<div class=w><div u="thumbnailtemplate" class="c"></div></div>
</div>
</div>
<!-- Thumbnail Item Skin End -->
</div>
<!--#endregion ThumbnailNavigator Skin End -->
When this error happens, any other JavaScript afterwards doesn't work.