anchor.diff:  
   module SampleInternals =
       
  +
  +    [<JavaScript>]
  +    let SetAttr attr value elem =
  +        elem
  +        |>! OnAfterRender (fun elem ->
  +                JQuery.JQuery.Of(elem.Body).Attr(attr, value).Ignore)
  +
  +    [<JavaScript>]
  +    let AddDataRole role elem = SetAttr "data-role" role elem
  +        
       [<JavaScript>]
       let SimplePage () = 
           let jq = JQuery.Mobile.MobileJQ.JQuery // should trigger webresource.
           let header =
               Div [H1 [Text "Page Title"]]
  -            |>! OnAfterRender (fun elem ->
  -                JQuery.JQuery.Of(elem.Body).Attr("data-role", "header").Ignore)
  +            |> AddDataRole "header"
  +
           let content =
               Div [P [Text "Lorem ipsum dolor sit amet, consectetur adipiscing"]]
  -            |>! OnAfterRender (fun elem ->
  -                JQuery.JQuery.Of(elem.Body).Attr("data-role", "content").Ignore)
  +            |> AddDataRole "content"
  +
           let footer =
               Div [H4 [Text "Page Footer"]]
  -            |>! OnAfterRender (fun elem ->
  -                JQuery.JQuery.Of(elem.Body).Attr("data-role", "footer").Ignore)
  -        
  +            |> AddDataRole "footer"
  +
           let page = 
               Div [header
                    content
                    footer]
  -            |>! OnAfterRender (fun elem ->
  -                JQuery.JQuery.Of(elem.Body).Attr("data-role", "page").Ignore)
  +            |> AddDataRole "page"
  +
           page    
   
       [<JavaScript>]
  
positive.code:     [<JavaScript>]
      override this.Body = 
          // SampleInternals.SimplePage () :> IPagelet
          SampleInternals.SimpleNavigation () :> IPagelet
  
negative.code:             about
          ]
          
          
      [<JavaScript>]
      let FormTypes () = 
          let jq = JQuery.Mobile.MobileJQ.JQuery // should trigger webresource.
          let home =
              let header =
                  Div [H1 [Text "Ice Cream Order Form"]]
                  |> AddDataRole "header"
          
              let content =
                  let checkbox (name: string) = 
                      Input [
                          Attr.Type "checkbox" 
                          Name name
                          Id name
                          Attr.Class "custom"
                      ]
                      -- 
                      Label [
                          Attr.For name
                          Text name
                      ]
  
                  Div [
                      Form [ Action "#"
                             Method "get"
                             // Name Field
                             Div [
                                Label [
                                  Attr.For "name"
                                  Text "Your name:"
                                ]
                                Input [
                                  Attr.Type "text"
                                  Attr.Name "name"
                                  Attr.Value ""
                                ] 
                             ] |> AddDataRole "fieldcontain" :> IPagelet
                             
                             // Flavour field
                             Div [
                                Legend [
                                  Text "Which flavours would you like?"
                                ]
                                checkbox "Vanilla"
                                checkbox "Chocolate"
                                checkbox "Strawberry"
                             ] |> AddDataRole "controlgroup" :> IPagelet
                             // Cones Field
                             Div [
                                Label [
                                  Attr.For "quantity"
                                  Text "Number of cones:"
                                ]
                                Input [
                                  Attr.Type "range"
                                  Attr.Name "quantity"
                                  Attr.Id   "quantity"
                                  Attr.Value "1"
                                ] 
                                |> SetAttr "min" "1" 
                                |> SetAttr "max" "100" 
                             ] |> AddDataRole "fieldcontain" :> IPagelet
                             
                             // Sprinkles Field
                             Div [
                                Label [
                                  Attr.For "sprinkles"
                                  Text "Sprinkles:"
                                ]
                                Select [
                                  Attr.Name "sprinkles"
                                  Attr.Id   "sprinkles"
                                  Default.H.Option [
                                      Attr.Value "on"
                                      Text "Yes"
                                  ] :> IPagelet
                                  Default.H.Option [
                                      Attr.Value "off"
                                      Text "No"
                                  ] :> IPagelet
                                ] |> AddDataRole "slider"
                                
                             ] |> AddDataRole "fieldcontain" :> IPagelet
  
                             // Store Field
                             Div [
                                Label [
                                  Attr.For "store"
                                  Text "Collect from store:"
                                ]
                                Select [
                                  Attr.Name "store"
                                  Attr.Id   "store"
                                  Default.H.Option [
                                      Attr.Value "mainStreet"
                                      Text "Main Street"
                                  ] :> IPagelet
                                  Default.H.Option [
                                      Attr.Value "libertyAvenue"
                                      Text "Liberty Avenue"
                                  ] :> IPagelet
                                  Default.H.Option [
                                      Attr.Value "circleSquare"
                                      Text "Circle Square"
                                  ] :> IPagelet
                                  Default.H.Option [
                                      Attr.Value "angelRoad"
                                      Text "Angel Road"
                                  ] :> IPagelet
                                ]
                                
                             ] |> AddDataRole "fieldcontain" :> IPagelet
                             
                             
                             Div [
                                Attr.Class "ui-body ui-body-b"
                                FieldSet [
                                  Attr.Class "ui-grid-a"
                                  Div [ 
                                      Attr.Class "ui-block-a"
                                      Button [
                                          Attr.Type "submit"
                                          Text "Cancel"
                                      ] |> SetAttr "data-theme" "a" :> IPagelet
                                  ] :> IPagelet
                                  Div [
                                      Attr.Class "ui-block-b"
                                      Button [
                                          Attr.Type "submit"
                                          Text "Order Ice Cream"
                                      ] |> SetAttr "data-theme" "a" :> IPagelet
                                  ] :> IPagelet
                                ] :> IPagelet
                             ] :> IPagelet
                      ]
                  ] |> AddDataRole "content" :> IPagelet
                  
              let page = 
                  Div [Attr.Id "home"
                       header  :> IPagelet
                       content]
                  |> AddDataRole "page"
              page
  
          home    
  
  type Samples() = 
      inherit Web.Control()
  