The problem with your code seems to be the elseif-statement which should be else if
(Notice the space).
I rewrote and simplyfied the code to this:
$(document).ready(function () {
if (screen.width < 1024) {
$(".yourClass").hide();
}
else {
$(".yourClass").show();
}
});