Click here to Skip to main content
13,193,064 members (51,095 online)
Click here to Skip to main content
Add your own
alternative version


2 bookmarked
Posted 25 Oct 2012

Custom jQuery for Windows 8

, 25 Oct 2012
Rate this:
Please Sign up or sign in to vote.
jQuery customised version to be used with Windows 8.


With Windows 8 we get an ability to write HTML5 apps in JavaScript. With JavaScript comes a vast library of code already written for we. jQuery is one such useful library. jQuery can run under WinRT and apps will work fine while development. But none of the apps will get approved on the marketplace because jquery uses some code which seems malicious to windows 8 testers. For example Dynamic HTML injection. Thus i have created a customized version  of jQuery which passes windows 8 test. 

Using the code 

Step 1: Include jqueryWin8.js file in your project. 

Step 2: Type this <div> in your HTML file 

<div id="test"><link/><table></table><a href='' style='top:1px;float:left;opacity:.55;'>a</a><input type='checkbox'/></div> 

Include jqueryWin8.js in your HTML file. 

<script type="text/javascript" src="js/jqueryWin8.js"></script>   

Step 3: Use jQuery $() and other features in your app. 

Step 4: Profit  

The code works because instead of using div.innerHTML() function we are explicitly making a "test" div  which jQuery uses to test for some support. 


This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


About the Author

United States United States
No Biography provided

You may also be interested in...

Comments and Discussions

GeneralMy vote of 5 Pin
LonghronShen20-Jun-13 22:06
memberLonghronShen20-Jun-13 22:06 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

Permalink | Advertise | Privacy | Terms of Use | Mobile
Web01 | 2.8.171017.2 | Last Updated 25 Oct 2012
Article Copyright 2012 by niklabh
Everything else Copyright © CodeProject, 1999-2017
Layout: fixed | fluid