SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Enthusiast
    Join Date
    Jun 2014
    Posts
    70
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    CSS/JQuery - Show / Hide Upon Page Width Problem

    Hiya Everyone,

    A little first look at my upcoming website for those viewing this thread, however I'm having a little problem with a bit of styling I'm programming for it.

    http://rafflebananza.com/admin/test.html

    Change your width and you'll see the smaller menu, expand and you'll see the first menu, however my onClick function to show the list for the smaller menu, upon sliding back up,hides the list so I need some help with addign something to either my JQuery or css to reshow it again upon page resize on or above width: 835px

    Best Regards,
    Tim

  2. #2
    SitePoint Enthusiast
    Join Date
    Jun 2014
    Posts
    70
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Resolved and updated live view, I used the following;

    Code:
    $(window).resize(function() {
    	var iw = $('body').innerWidth();
    	if (iw > 834) {
    		$('#TopNavList').css('display', 'block');
    	} else {
    		$('#TopNavList').css('display', 'none');
    	}
    });


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •