-
Notifications
You must be signed in to change notification settings - Fork 78
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
(#198)Added ReadMore feature to Designers #209
base: gh-pages
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -280,3 +280,8 @@ nav .logo { | |
top: 0; | ||
} | ||
|
||
#more1, #more2, #more3, #more4 {display: none;} | ||
|
||
.designer_text{ | ||
font-weight: bold; | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,4 +23,35 @@ $(document).ready(function () { | |
}); | ||
$('.map-holder').click(function () { | ||
$(this).removeClass('zoom-off'); | ||
}); | ||
}); | ||
|
||
function readMore(number) { | ||
if (number == 1) { | ||
var dots = document.getElementById("dots1"); | ||
var moreText = document.getElementById("more1"); | ||
var btnText = document.getElementById("myBtn1"); | ||
|
||
} else if (number == 2) { | ||
var dots = document.getElementById("dots2"); | ||
var moreText = document.getElementById("more2"); | ||
var btnText = document.getElementById("myBtn2"); | ||
|
||
} else if (number == 3) { | ||
var dots = document.getElementById("dots3"); | ||
var moreText = document.getElementById("more3"); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Append the number to the IDs and reduce the ifs. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I tried that, I failed terribly. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It won't fail, please do it correctly. |
||
var btnText = document.getElementById("myBtn3"); | ||
}else if (number == 4) { | ||
var dots = document.getElementById("dots4"); | ||
var moreText = document.getElementById("more4"); | ||
var btnText = document.getElementById("myBtn4"); | ||
} | ||
if (dots.style.display === "none") { | ||
dots.style.display = "inline"; | ||
btnText.innerHTML = "Read more"; | ||
moreText.style.display = "none"; | ||
} else { | ||
dots.style.display = "none"; | ||
btnText.innerHTML = "Read less"; | ||
moreText.style.display = "inline"; | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https://www.w3schools.com/cssref/css3_pr_text-overflow.asp