Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7515721
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T00:54:00+00:00 2026-05-30T00:54:00+00:00

I have just started to work with jquery so I need to make sure

  • 0

I have just started to work with jquery so I need to make sure I do it alright. I’ll explain what I believe right now, please give me your thoughts.

First I think that the html output from the server should be mainly for those that don’t have js or if there’s a browser bug. That way the page will work for everyone I hope.

Then I think that jquery should have hidden data and templates that it uses to modify the page.

I don’t know what format the templates should be in. One idea is to just make it like this

<div id="checkbox-template" class="templatedefinition" style="visibility:hidden">
<input type="checkbox"><label></label>
</div>

This would be perfect I think but I have my doubts. Another idea would be to use

$(document.createElement())

And then there are several options to treat the data. I’ve tried something simple like this:

var fruits= new Array(
    // id - Label - info
    new Array("orange","Orange","some info"),
    new Array("apple","Apple","some info"),
    new Array("banana","Banana","some info")
    );

And now I’m ready to construct checkboxes for the fruits and modify the original page. But before I start to do something like this in all my solutions it would be great to know if something like this is alright.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T00:54:02+00:00Added an answer on May 30, 2026 at 12:54 am

    First let me say that there’s no hard and fast rule to your question and imo it voices down to personal preference for specific situations. Here are some considerations to help you along:

    First I think that the html output from the server should be mainly
    for those that don’t have js or if there’s a browser bug. That way the
    page will work for everyone I hope.

    You are talking about "Progressive enhancement" which is a strategy to increase "accessibility" to your website. To do so, you would plan and develop a user experience that works for folks who don’t have Javascript enabled before you add-on Javascript to enhance that experience for those who do have it enabled. You should plan in your design what kind of functionality is "lost" when Javascript is not available – Simplistically put – good "accessibility" is when the main task like say "submitting a form" still works without Javascript.

    You’re also asking if you should output hidden html elements that are meant only for the ‘enchanced Javascript experience’ in the HTML or should you ‘generate’ it on the fly using Javascript. This brings us to another term – "Unobtrusive JavaScript".

    One school of thought is to never put any thing that is meant for the javascript-only experience in your html page and use Javascript itself to add those stuff to the DOM. The advanage to that is that you will have a cleaner, more lightweight and portable html page.

    Another school of thought is to be less "purist" and more "practical" – meaning do what is most efficient. Don’t write an extra 100 lines of Javascript code and spent an extra 2 hours if you can simply add the extra code directly to the HTML page and hide it with css.

    I personally believe that as programmers we should always consider the business value when making these decisions. Ask yourself things like "How much time should i spent to do this?", "am I creating a website for 5 hundred or 5 million users?". Basically, don’t use an grenade to kill a mice 😉

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have just started to work with jquery mobile, and things are going swimmingly,
I have just started to look at .NET 3.5 so please forgive me if
I have just started with jQuery. I am trying to implement zebra striping in
I just started using the jquery swfupload plugin and I have everything working besides
I have just started to work as a freelance iPhone developer. Earlier I used
I have just started to work on web applications, and learning to use ASP.Net.
I have just started considering using the HTML 5 api for a Rails/JQuery project,
I have just started work on auditing the Linux kernel and I cant help
I have just started to work with Ninject 2.0 with ASP.NET MVC 2. So,
Have just started using Google Chrome , and noticed in parts of our site,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.