Dynamic Class Assignment Based on Device
Budget: $100 – $200 USD
I'm seeking a skilled web developer who can help me dynamically change a CSS class based on the device type, specifically for mobile and desktop.
The current setup:
- I have two CSS classes, one for mobile labeled `.mobile_label` (color: red) and another for desktop `.desktop_label` (color: blue).
- The HTML structure includes a `` element with an ID of `set_class` which should receive the appropriate class based on the device type.
Requirements:
- Use JavaScript to detect the device type on page load and assign the correct class to the `set_class` element.
- You do not need to consider screen size for the class assignment; it's purely based on device type (mobile vs desktop).
- Ensure that the appropriate display blocks are shown based on the device type.
Ideal skills and experience:
- Proficiency in JavaScript, CSS, and HTML is a must.
- Previous experience with dynamic class assignment based on device detection is highly desirable.
- Familiarity with jQuery is a plus but not necessary for this project.
The current setup:
- I have two CSS classes, one for mobile labeled `.mobile_label` (color: red) and another for desktop `.desktop_label` (color: blue).
- The HTML structure includes a `` element with an ID of `set_class` which should receive the appropriate class based on the device type.
Requirements:
- Use JavaScript to detect the device type on page load and assign the correct class to the `set_class` element.
- You do not need to consider screen size for the class assignment; it's purely based on device type (mobile vs desktop).
- Ensure that the appropriate display blocks are shown based on the device type.
Ideal skills and experience:
- Proficiency in JavaScript, CSS, and HTML is a must.
- Previous experience with dynamic class assignment based on device detection is highly desirable.
- Familiarity with jQuery is a plus but not necessary for this project.