Skip to content

Commit

Permalink
Update main.js
Browse files Browse the repository at this point in the history
  • Loading branch information
hpcreator authored Jun 16, 2024
1 parent 59d6621 commit 818cef5
Showing 1 changed file with 14 additions and 21 deletions.
35 changes: 14 additions & 21 deletions main.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,10 @@
/**This function is used for flip the card */
document.getElementById('clickToFlap').addEventListener('click', function() {
document.getElementById('flipCard').classList.toggle('flip');
setTimeout(() => {
document.getElementById('back-card').classList.toggle('d-block');
}, 200);
});


$( document ).ready(function() {
//this function is used for making the details html
//this function is used for making the details html
$(function() {
var detailsWrapper = document.getElementById("detail-list"); // get the details html div

var myDetailHTML = ''; //variable that hold my details html
Expand Down Expand Up @@ -41,7 +37,7 @@ $( document ).ready(function() {
},
{
key : "Height",
value : `5' 8"`,
value : `5' 6"`,
},
{
key : "Cast",
Expand All @@ -57,23 +53,23 @@ $( document ).ready(function() {
},
{
key : "Profession",
value : "Android Developer at Openxcell Technolabs",
value : "Software Engineer",
},
{
key : "Father's Name",
value : "Joginbhai Vadilal Patel",
},
{
key : "His Profession",
value : "Social Worker",
value : "Farmer",
},
{
key : "Mother's Name",
value : "Urmilaben Joginbhai Patel",
},
{
key : "Her Profession",
value : "House Maker",
value : "Housewife",
},
{
key : "Brother",
Expand Down Expand Up @@ -107,20 +103,16 @@ $( document ).ready(function() {

detailsWrapper.innerHTML = myDetailHTML //adding the dynamic html as inner HTML of my details div

});


//this function is used for showing my all photos

//this function is used for showing my all photos
$(function() {
var imagesWrapper = document.getElementById("all-images"); //this is holding the parent container where my all photo's html will be inserted

//this is the variable that hold my image name and my all images exist in assets folder
var myImageName = [
'1.jpg',
'1.jpg',
'1.jpg',
'1.jpg',
'1.jpg',
'1.jpg',
'harsh2.jpg',
'harsh3.jpg',
]

var myImageHTML = ''; //variable that hold the html of my all photos
Expand All @@ -130,10 +122,11 @@ $( document ).ready(function() {
}

imagesWrapper.innerHTML = myImageHTML //adding the dynamic html of my all photos as inner HTML of parent div
});


//this function is used for open the image into popup

//this function is used for open the image into popup
$(function() {
$('.pop-img').on('click', function() {
$('.imagepreview').attr('src', $(this).attr('src'));
$('#imagemodal').modal('show');
Expand Down

0 comments on commit 818cef5

Please sign in to comment.