Tech
Forums
Jobs
Books
Events
Live
Interviews Prep
More
Learn
Training
Career
Members
Videos
News
Blogs
Login
Sign Up
Ask Question
2
Reply
which is best way detect mobile device javascript or media?
Ramesh S
Dec 7 2015 12:22 AM
405
Reply
which is best way detect mobile device javascript or media query?
javascript
$(document).ready(function () {
alert(detectmob());
});
function detectmob() {
if (window.innerWidth <= 800 && window.innerHeight <= 600) {
return false;
} else {
$(".blackbutton").addClass("ismobileblockbutton");
$('.ismobileblockbutton').removeAttr("href")
}
}
media query
@media screen and (min-width:600px) and (max-width: 800px) {
.tbms {
height: 60px !important;
}
}
Upload Source Code
Select only zip and rar file.
Post
Reset
Cancel
Answers (
2
)
Next Recommended Forum
Related to promptbox
javascript problem