0

I have below HTML inside html file which is referred in webpart page CEWP. Though this works fine as independant html page, while rendering in sharepoint , it is somehow showing up data-ico attribute text. Can you pls help out in pinpoinintg the issue. Code is simple jQuery mobile demo in sharepoint.

enter image description here

<!DOCTYPE html> 
    <html>
    <head>
        <title>Registration</title>
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <link rel="stylesheet" href="https://code.jquery.com/mobile/1.0.1/jquery.mobile-1.0.1.min.css" />
        <script src="https://code.jquery.com/jquery-1.6.4.min.js"></script>
        <script src="https://code.jquery.com/mobile/1.0.1/jquery.mobile-1.0.1.min.js"></script>
    </head>
    <body>
    <div data-role="page" id="home">
       <header data-role="header">
            <h1>Register</h1>
       </header>
       <div data-role="main"  class="ui-content">
           <div data-role="fieldcontain">
               <label for="Services"  class="ui-hidden-accessible " >
                   Country:
               </label>
               <select name="Services" id="Services" data-native-menu="false" data-mini="true" multiple="multiple" size="4">
                   <option>Country</option>
                   <option value="hotel">Hotel</option>
                   <option value="transport">Transport</option>
                   <option value="others">Others</option>
               </select>
           </div>
        </div>
    </div>
    </body>
    </html>
2

Looks like content in a CSS :after or :before rule gets the class value.

[selector]::after{
                   content:class
                 }

I presume you copy/paste code and not understand what you are doing

Start by using current jQuery versions, you are using 4 to 5 year old versions...

https://en.wikipedia.org/wiki/JQuery#Release_history https://en.wikipedia.org/wiki/JQuery_Mobile#Release_history

  • You are right Danny, i did copy the code and dont have much understanding. However, referencing latest jquery files doesnt make any difference and shows same output. so I was wondering why same code works in plain HTML ,but breaks when added in the sharepoint page. I feel thats valid question , irrespective of i copy code write it myself. – Rohit Feb 8 '16 at 11:07
  • Now you ruled out jQuery, you have to check (hunt for) which CSS rule changes your UI... F12 Developer Tools – Danny '365CSI' Engelman Feb 8 '16 at 13:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.