I will try two scalize id however only one more worked. Every time second scalize function worked. How can I use one more scalize in one page. I want use scalize in repater.
I will try two scalize id however only one more worked. Every time second scalize function worked. How can I use one more scalize in one page. I want use scalize in repater.
`
<div class="scalize" id="scalize2">
<!-- Start Popover Template -->
<div id="content6" class="content center top">
<div class="head">
<img src="img/close.png" alt="" />
<h6 class="title">4</h6>
</div>
<div class="body">
<p>Lorem ipsum dolor sit amet, ne est populo dictas, et pri ferri ubique labitur.</p>
<p>Mel ad euismod adipiscing moderatius eos an decore quodsi animal.</p>
</div>
</div>
<div id="content4" class="content right top">
<div class="head">
<img src="img/close.png" alt="" />
<h6 class="title">5</h6>
</div>
<div class="body">
<p>Lorem ipsum dolor sit amet, ne est populo dictas, et pri ferri ubique labitur.</p>
<p>Mel ad euismod adipiscing moderatius eos an decore quodsi animal.</p>
</div>
</div>
<div id="content5" class="content right bottom">
<div class="head">
<img src="img/close.png" alt="" />
<h6 class="title">6</h6>
</div>
<div class="body">
<p>Lorem ipsum dolor sit amet, ne est populo dictas, et pri ferri ubique labitur.</p>
<p>Mel ad euismod adipiscing moderatius eos an decore quodsi animal.</p>
<p>Lorem ipsum dolor sit amet, ne est populo dictas, et pri ferri ubique labitur.</p>
</div>
</div>
<!-- End Popover Template -->
<img src="img/deneme.jpg" alt="" class="target">
<!-- Start Item Point -->
<div class="item-point item-point2" data-top="121" data-left="922" data-popover="#content4">
<div></div>
</div>
<!-- End Item Point -->
<!-- Start Item Point -->
<div class="item-point item-point2" data-top="333" data-left="462" data-popover="#content5">
<div></div>
</div>
<!-- End Item Point -->
<!-- Start Item Point -->
<div class="item-point item-point2" data-top="444" data-left="546" data-popover="#content6">
<div></div>
</div>
<!-- End Item Point -->
</div>
<div class="scalize" id="scalize3">
<!-- Start Popover Template -->
<div id="content1" class="content right top">
<div class="head">
<img src="img/close.png" alt="" />
<h6 class="title">1</h6>
</div>
<div class="body">
<p>Lorem ipsum dolor sit amet, ne est populo dictas, et pri ferri ubique labitur.</p>
<p>Mel ad euismod adipiscing moderatius eos an decore quodsi animal.</p>
</div>
</div>
<div id="content3" class="content right top">
<div class="head">
<img src="img/close.png" alt="" />
<h6 class="title">2</h6>
</div>
<div class="body">
<p>Lorem ipsum dolor sit amet, ne est populo dictas, et pri ferri ubique labitur.</p>
<p>Mel ad euismod adipiscing moderatius eos an decore quodsi animal.</p>
</div>
</div>
<div id="content2" class="content right bottom">
<div class="head">
<img src="img/close.png" alt="" />
<h6 class="title">3</h6>
</div>
<div class="body">
<p>Lorem ipsum dolor sit amet, ne est populo dictas, et pri ferri ubique labitur.</p>
<p>Mel ad euismod adipiscing moderatius eos an decore quodsi animal.</p>
<p>Lorem ipsum dolor sit amet, ne est populo dictas, et pri ferri ubique labitur.</p>
</div>
</div>
<!-- End Popover Template -->
<img src="img/2.jpg" alt="" class="target">
<!-- Start Item Point -->
<div class="item-point item-point3" data-top="320" data-left="922" data-popover="#content1">
<div></div>
</div>
<!-- End Item Point -->
<!-- Start Item Point -->
<div class="item-point item-point3" data-top="180" data-left="462" data-popover="#content3">
<div></div>
</div>
<!-- End Item Point -->
<!-- Start Item Point -->
<div class="item-point item-point3" data-top="192" data-left="546" data-popover="#content2">
<div></div>
</div>
<!-- End Item Point -->
</div>
<script type="text/javascript">
$(document).ready(function () {
$('#scalize2').scalize({
styleSelector: 'circle',
animationPopoverIn: 'fadeIn',
animationPopoverOut: 'fadeOut',
animationSelector: 'pulse2',
selector: '.item-point2',
getSelectorElement: function (el) {
$('.item-point2 .active').not($(el)[0]).find('.toggle2').click();
}
});
$('#scalize3').scalize({
styleSelector: 'circle',
animationPopoverIn: 'fadeIn',
animationPopoverOut: 'fadeOut',
animationSelector: 'pulse2',
selector: '.item-point3',
getSelectorElement: function (el) {
$('.item-point3 .active').not($(el)[0]).find('.toggle3').click();
}
});
});
</script>
`
Related
I am trying to make an accordion using bootstrap 5. Everything is okay but the expand button is not working. If Accordion1 is expanded then I can't expand other Accordion.
My code is given below:
<div className="accordion " id="accordionPanelsStayOpenExample">
<div className="accordion-item">
<h2 className="accordion-header" id="panelsStayOpen-headingOne">
<button className="accordion-button" type="button" data-bs-toggle="collapse" data-bs-target="#panelsStayOpen-collapseOne" aria-expanded="true" aria-controls="panelsStayOpen-collapseOne">
Accordion Item #1
</button>
</h2>
<div id="panelsStayOpen-collapseOne" className="accordion-collapse collapse show" aria-labelledby="panelsStayOpen-headingOne">
<div className="accordion-body">
<strong>Lorem ipsum dolor sit amet consectetur adipisicing elit. Cum voluptatum accusantium voluptates, quaerat voluptas tempore ut tempora, qui suscipit error veritatis. Voluptatem deserunt ipsa non optio! Ipsam deleniti maxime pariatur.</strong>
</div>
</div>
</div>
<div className="accordion-item">
<h2 className="accordion-header" id="panelsStayOpen-headingTwo">
<button className="accordion-button collapsed" type="button" data-bs-toggle="collapse" data-bs-target="#panelsStayOpen-collapseTwo" aria-expanded="false" aria-controls="panelsStayOpen-collapseTwo">
Accordion Item #2
</button>
</h2>
<div id="panelsStayOpen-collapseTwo" className="accordion-collapse collapse" aria-labelledby="panelsStayOpen-headingTwo">
<div className="accordion-body">
<strong>This is the second item's accordion Lorem ipsum dolor sit amet consectetur adipisicing elit. Odit aliquid dolor beatae alias quas culpa reiciendis expedita deserunt sint quidem.</strong>
</div>
</div>
</div>
<div className="accordion-item">
<h2 className="accordion-header" id="panelsStayOpen-headingThree">
<button className="accordion-button collapsed" type="button" data-bs-toggle="collapse" data-bs-target="#panelsStayOpen-collapseThree" aria-expanded="false" aria-controls="panelsStayOpen-collapseThree">
Accordion Item #3
</button>
</h2>
<div id="panelsStayOpen-collapseThree" className="accordion-collapse collapse" aria-labelledby="panelsStayOpen-headingThree">
<div className="accordion-body">
It is hidden by default, until the collapse plugin adds the appropriate classes that we use to style each element. These classes control the overall appearance, as well as the showing and hiding via CSS transitions. You can modify any of this with custom CSS or overriding our default variables. It's also worth noting that just about any HTML can go within the , though the transition does limit overflow.
</div>
</div>
</div>
</div>
I think I am making something wrong. If anyone show me the mistake, I will be very happy.
I am trying to show product using axois function , i have no idea how can i get data in axois by using for loop Does anyone have an idea please help me thanks.
please check response in console. https://ibb.co/YhqMsYZ
controller
public function store(Request $request)
{
$products = Product::with('productColorGallary')->where('status', 1)->get();
$data = [
'product' => $products
];
return response()->json($data, 200);
}
jquery script
let url = "{{route('products.store')}}";
axios.get(url, {
params:{
}
}).then((res)=>{
let product =res.data;
// console.log(product);
for(var i =0; i< product.length; i++)
{
$('#product').append(
`<div class="col-md-4 col-sm-6 col-6">
<div class="wallprodCard">
<div class="prodcardImage">
<img src="{{url('')}}/assets/images/wallpapers/wallpaper-1-01.jpg" alt="">
<a class="prodcardFancy" href="{{url('')}}/assets/images/wallpapers/wallpaper-1-01.jpg" data-fancybox="images" data-caption="Flooring">
<i class="fa fa-search-plus">
</i>
</a>
</div>
<div class="prodcardDescp">
<a href="{{url('')}}/wallpaper-details">
<h4 class="prodcardtitle">product name
</h4>
</a>
<p class="text">Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
</p>
</div>
</div>
</div>
`);
}
});
});
html view
<div class="tab-content">
<div class="tab tab-active" data-id="tab1">
<div class="row">
<div id="product"> </div>
</div>
</div>
<!--end of tab one-->
</div>
as res.data this is not product array
use this
let product =res.data.product;
as ur loop in javascript and and u r using `` this operator so u can use
string text ${expression} string text ref link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals
$('#product').append(
`<div class="col-md-4 col-sm-6 col-6">
<div class="wallprodCard">
<div class="prodcardImage">
<img src="{{url('')}}/assets/images/wallpapers/wallpaper-1-01.jpg" alt="">
<a class="prodcardFancy" href="{{url('')}}/assets/images/wallpapers/wallpaper-1-01.jpg" data-fancybox="images" data-caption="Flooring">
<i class="fa fa-search-plus">
</i>
</a>
</div>
<div class="prodcardDescp">
<a href="{{url('')}}/wallpaper-details">
<h4 class="prodcardtitle">product name
</h4>
</a>
<p class="text">Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
</p>
</div>
</div>
</div>
${dynamicdata} // here u can use your javascript variable
`);
i find this useful and it will be worth trying it. in your component, you can initialize an empty array in the data() methods. assume you use an array called products,then this is how your script tag should be
<script>
export default{
data(){
return{
//now the empty array
products:[]
}
},
methods:{
getProducts:function(){
axios.get(url).then((response)=>{
this.products=response.data
//this saves the json data in the array
//you can then catch the error
//then check the html above
})
}
},
created(){
this.getProducts()
//
}
}
</script>
<div class="row">
<!-- the loop will create n numbers of elements with a col-sm-4 class for all length of products-->
<div class="col-sm-4 col-sm-6 col-6" v-for="product in products" :key="product.id">
<div class="col-md-4 col-sm-6 col-6">
<div class="wallprodCard">
<div class="prodcardImage">
<img :src="assets/images/wallpapers/wallpaper-1-01.jpg" alt="">
<a class="prodcardFancy" href="assets/images/wallpapers/wallpaper-1-01.jpg" data-fancybox="images" data-caption="Flooring">
<i class="fa fa-search-plus">
</i>
</a><!--Kindly Note thatif this field is dynamic, you mightwant to bind the href attribute to the dynamic value ie. the a href should be a :href="dynamic value"-->
</div>
<div class="prodcardDescp">
<a href="/wallpaper-details"><!--Kindly Note thatif this field is dynamic, you mightwant to bind the href attribute to the dynamic value ie. the a href should be a :href="dynamic value"-->
<h4 class="prodcardtitle">product name
</h4>
</a>
<p class="text">Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
</p>
</div>
</div>
</div>
</div>
</div>
In my Laravel application, I have made a component in Vue. The component itself is rendering properly, but the click handler is not firing. I have read many articles on the issue, but can't find the solution.(https://prnt.sc/tyiwmh + https://prnt.sc/tyiwwb + https://prnt.sc/tyix8l)
<template>
<div class="item border rounded-lg p-3">
<header>
<h2 class="mb-3">John Doe</h2>
<div class="arrows" v-on:click="showContent">
<img src="storage/img/chevron-down-light.svg" alt="" class="arrow-down">
<img src="storage/img/chevron-up-light.svg" alt="" class="arrow-up">
</div>
</header>
<div class="item-content" v-if="visible">
<div class="content-1">
<ul>
<li><b>Email:</b> john.doe#hotmail.com</li>
<li><b>Tel:</b> 0497 99 88 77</li>
</ul>
</div>
<hr>
<div class="content-2">
<ul>
<li><b>Vertrekplaats:</b> Ark van Noƫ</li>
<li><b>Aankomstplaats:</b> Watermolen Grobbendonk</li>
</ul>
</div>
<hr>
<div class="content-3">
<ul>
<li>2 enkelzitkajaks</li>
<li>3 dubbelzitkajaks</li>
<li>0 canadese kano's</li>
<li>2 zwemvesten</li>
<li>3 tonnetjes</li>
</ul>
</div>
<hr>
<div class="content-4">
<h3>Extra info:</h3>
<p>
Lorem ipsum dolor sit amet consectetur adipisicing elit. Incidunt fuga dignissimos hic? Velit, ea aliquam! Consequuntur provident vitae, hic repudiandae, animi, ipsa ullam quidem accusamus vero ipsum aut porro nostrum.
</p>
</div>
</div>
</div>
</template>
<script>
export default {
data: function() {
return {
visible: false
}
},
methods: {
showContent: function() {
console.log('the button is clicked');
}
}
}
</script>
This might help no method necessary:
<div class="arrows" #click="visisble = !visible">
<img #click="visisble = !visible"
:src="'storage/img/chevron-' + (visible ? 'down-light.svg':'up-light.svg')"
alt=""
:class="'arrow-' + (visible ? 'down' : 'up' )">
</div>
I want to put a background image or background color for tag but i dont know how to it. Thanks
</div>
<div class="clear"> </div>
<!---start-content---->
<div class="main-content">
<div class="wrap">
<div class="left-sidebar">
<div class="sidebar-boxs">
<div class="clear"> </div>
<div class="type-videos">
<h3>Categories</h3>
<ul>
<li>Korean Drama</li>
<li>Lorem ipsum dolor</li>
<li>Lorem ipsum dolor</li>
<li>Lorem ipsum dolor</li>
<li>Lorem ipsum dolor</li>
<li>Lorem ipsum dolor</li>
<li>Lorem ipsum dolor</li>
<li>Lorem ipsum dolor</li>
<li>Lorem ipsum dolor</li>
<li>Lorem ipsum dolor</li>
<li>Lorem ipsum dolor</li>
</ul>
Here's a short fiddle: https://jsfiddle.net/Hoargarth/qd60qa1L/1/
Basically you just need css for your html tag or a class.
html:
<!-- with css tag -->
<li>
test2
</li>
<!-- or with css class -->
<li class="list">
test3
</li>
css:
li {
background-color:red;
}
/* with class*/
.list{
background-color:green;
}
I'm new to bootstrap and not that long into coding.
I created a carousel in bootstrap but the image is centered in the middle. but i want it to spread over the whole carousel. How do i fix this?
And i want the text on it be on te picture on the left side. How can i do this? I tried with text-align but maybe i did it at the wrong line.
<div class="row dnd_bottomspace">
<div class="col-md-12">
<div id="myCarousel" class="carousel slide" data-ride="carousel">
<!-- Carousel indicators -->
<ol class="carousel-indicators">
<li data-target="#myCarousel" data-slide-to="0" class="active"></li>
<li data-target="#myCarousel" data-slide-to="1"></li>
<li data-target="#myCarousel" data-slide-to="2"></li>
<li data-target="#myCarousel" data-slide-to="3"></li>
</ol>
<!-- Carousel items -->
<div class="carousel-inner">
<div class="active item">
<h2>Slide 1</h2>
<div class="carousel-caption">
<img src="Materialien/erde.jpg" class="img-responsive">
<h3>Erster Slider</h3>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p>
</div>
</div>
<div class="item">
<h2>Slide 2</h2>
<div class="carousel-caption">
<img src="Materialien/erde.jpg" class="img-responsive">
<h3>Zweiter Slider</h3>
<p>Aliquam sit amet gravida nibh, facilisis gravida odio.</p>
</div>
</div>
<div class="item">
<h2>Slide 3</h2>
<div class="carousel-caption">
<img src="Materialien/erde.jpg" class="img-responsive">
<h3>Dritter Slider</h3>
<p>Praesent commodo cursus magna, vel scelerisque nisl consectetur.</p>
</div>
</div>
<div class="item">
<h2>Slide 4</h2>
<div class="carousel-caption">
<img src="Materialien/erde.jpg" class="img-responsive">
<h3>Vierter Slider</h3>
<p>Aliquam sit amet gravida nibh, facilisis gravida odio.</p>
</div>
</div>
</div>
</div>
</div>
this part should be into class="item"
<img src="Materialien/erde.jpg" class="img-responsive">
any text describing the picture or something should be into class="carousel-caption".
if you want the text to be on the left side then
<div class="carousel-caption" style="text-align:left;">