WordPress Hide Show Content script and activate/deactivate script on screensize

I am currently using jquery.expander.js to hide/show paragraph content. I want to only use this for screen sizes less than 500px width and less (for mobile phones) ONLY. I am working in wordpress 3.5 and genesis theme 1.9.1

My questions:

Read More
  • Is there a good script proven and tested to load jquery.expander.js only on screen sizes 500px width and less. *The most important part is for desktop viewers if they reduce the screen size to 500px or less width it loads the jquery.expander.js and if they expand larger than 500px width it stops/kills the jquery.expander.js, again the reason being I just want to activate hide/show on a mobile device or desktop view that is 500px or less width.

  • The WordPress question is: When one of our marketers adds content to a page they will do this in the entry content window for that page, how can I edit my php so that it will somehow place a div of around the entry content. Sample code below for div and class name it needs for the script to work.

    <div class="expander">

    <h1>Welcome and Thanks</h1>

    <p>Aliquam aliquet, est a ullamcorper condimentum, tellus nulla fringilla elit, a iaculis nulla turpis sed wisi. Fusce volutpat. Etiam sodales ante id nunc. Proin ornare dignissim lacus. Nunc porttitor nunc a sem. Sed sollicitudin velit eu magna. Aliquam erat volutpat. Vivamus ornare est non wisi. Proin vel quam. Vivamus egestas. Nunc tempor diam vehicula mauris. Nullam sapien eros, facilisis vel, eleifend non, auctor dapibus, pede.</p>

    </div>

*If I have not followed the forum rules let me know and I will adjust

Related posts

Leave a Reply

1 comment