Is it possible to create a html file and save it to a directory using JQuery?
No, Javascript(client side) can't write to files
You can't if you want to create a file on the client machine. If you want to create a file on the server, the backend code can do that.
No, you won't be able to do that with JavaScript alone.
JavaScript runs in a client browser and saving files to local disk is a security threat.
From JavaScript Security
JavaScript Security Models
The modern JavaScript security model is based upon Java. In theory, downloaded scripts are run by default in a restricted “sandbox” environment that isolates them from the rest of the operating system. Scripts are permitted access only to data in the current document or closely related documents (generally those from the same site as the current document). No access is granted to the local file system, the memory space of other running programs, or the operating system’s networking layer. Containment of this kind is designed to prevent malfunctioning or malicious scripts from wreaking havoc in the user’s environment. The reality of the situation, however, is that often scripts are not contained as neatly as one would hope. There are numerous ways that a script can exercise power beyond what you might expect, both by design and by accident.
The fundamental premise of browsers’ security models is that there is no reason to trust randomly encountered code such as that found on Web pages, so JavaScript should be executed as if it were hostile. Exceptions are made for certain kinds of code, such as that which comes from a trusted source. Such code is allowed extended capabilities, sometimes with the consent of the user but often without requiring explicit consent. In addition, scripts can gain access to otherwise privileged information in other browser windows when the pages come from related domains.
Simple answer is no. Javascript runs in a sandbox environment and you cannot save files on user computer. You could save it to the server though by sending it through an AJAX request.
you can design html pages using javascript but not specifically using JQuery.
Checkout "TIBCO GENERAL INTERFACE"
Download and open sample project.
TIBCO GI is javascript based IDE to design html pages.
http://developer.tibco.com/gi/product%5Fresources37.jsp?tab=#
You cannot use purely Javascript or Jquery to save to the client machine however you can use Javascript and Flash 10 to save small files 3-4kb to the client machine.....go to this page for an example: http://downloadify.info/ and check out the demo.