3 Replies Latest reply on Feb 7, 2015 7:59 PM by bregent

    Anchor issues using JQuery Mobile


      I am having a lot of issues with getting anchors to work correctly while using JQuery Mobile Starter Page/Template. My instructor gave me a javascript to use, but that too is not working correctly. I've tried many different options on getting it to work and perform correctly and I've had no luck. This is a project that's due next week and as of right now this is the one thing that's holding me back. So basically what I'm trying to do is is when you Click on landmarks it'll bring you to a new page with different city's and when you click a city it'll take you to the anchor so you can start reading my information.


      The first anchor controlled by javascript works correctly, but when I add my second anchor and test it it'll go to the first anchors position, but a few paragraphs down. If I add a third it'll only move the page down a tad bit as if it wasn't moved at all.


      Much help is greatly appreciated


      Explore Ohio


      Explore Ohio ©2015 MU






      Mill Creek Park's Lanterns Mill


      Mill Creek Park (officially known as Mill Creek MetroParks) is a metropolitan park located in Youngstown, Ohio. The Trust for Public Land ranks one part of Mill Creek as the 142nd largest park located within the limits of a US city. Mill Creek MetroParks now stretches from the near west side of Youngstown to the southern borders of the city and neighboring Boardman township. The park "encompasses approximately 4400 acres (10.5 km²), 20 mi (32 km) of drives, and 15 mi (24 km) of foot trails" as well as a variety of bridges, ponds, streams, well-tended gardens, and waterfalls. If including the total size of the park system, Mill Creek ranks among the largest metropolitan-owned parks within the city limits of any US city.



      The Butler Art Institute  



      The Butler Institute of American Art, located on Wick Avenue in Youngstown, Ohio, United States, was the first museum dedicated exclusively to American art. Established by local industrialist and philanthropist Joseph G. Butler, Jr., the museum has been operating pro bono since 1919. Dedicated in 1919, the original structure is a McKim, Mead and White architectural masterpiece listed on the National Register of Historic Places.




      Stambaugh Auditorium


      Stambaugh Auditorium opened in 1926 through the generosity of Henry H. Stambaugh. It is located on Fifth Avenue across from Wick Park in Youngstown, Ohio. Stambaugh is virtually equidistant from Chicago and New York, as well as from Cleveland and Pittsburgh. Cleveland Hopkins Airport and the Pittsburgh International Airport are within an hour; New York or Chicago, an hour's flight. Access to interstates 80, 76 and 11 is a block away. Over a million people live in the immediate 6 county trading area. Youngstown State University with over 14,000 students is two blocks away. There are many other universities and colleges less than an hour by car with a combined student population of over 75,000.







      Dayton is the sixth largest city in the state of Ohio and is the county seat of Montgomery County. In the 2010 census, the population was 141,527; the Dayton metropolitan area had 841,502 residents, making it the fourth-largest metropolitan area in Ohio, after only the urban agglomerations of Cleveland, Cincinnati and Columbus, and the 63rd largest in the United States. The Dayton-Springfield-Greenville Combined Statistical Area had a population of 1,080,044 in 2010 and is the 43rd largest in the United States. Dayton is situated within the Miami Valley region of Ohio just north of the Cincinnati–Northern Kentucky metropolitan area.


      Carillon Historical Park



      The Park immerses you in the region’s history – from Dayton’s founding in 1796 through two centuries of expansion, industrialism and innovation. Learn about these revolutionary achievements while strolling through the Park’s 25 historical buildings and interacting with the hundreds of artifacts in our exhibits.Where else can you see the original 1905 Wright Flyer III, the world’s first practical airplane and National Historic Landmark, the 1835 B&O (Grasshopper) steam locomotive, and the first automobile self-starter?




      Woodland Cemetery Arboretum


      Woodland was incorporated in 1842 by John Whitten Van Cleve, the first male child born in Dayton.[2] He was the son of Benjamin Van Cleve and Mary Whitten Van Cleve. The cemetery began with 40 acres (160,000 m2) southeast of Dayton and has been enlarged to its present size of 200 acres (0.81 km2). Over 3,000 trees and 165 specimens of native Midwestern trees and woody plants grace the rolling hills. Many of the trees are more than a century old and 9 have been designated "Ohio Champions." The highest point in Dayton is within the cemetery, and during the Great Dayton Flood of 1913, it became a place of refuge.







































































































































      Explore Ohio ©2015 MU




      Explore Ohio ©2015 MU




      Explore Ohio ©2015 MU


      Ohio Sports


      Explore Ohio ©2015 MU


      Ohio's History


      Explore Ohio ©2015 MU




      Explore Ohio ©2015 MU

        • 1. Re: Anchor issues using JQuery Mobile
          bregent Most Valuable Participant

          Just to clear up some terminology. An anchor <a> is what we all call a hyperlink. You are referring to the name attribute of the anchor tag.  Named anchors are deprecated but whether you use them or element ID's they work the same.  Not really sure what you posted after your question - can you just post the code?


          >The first anchor controlled by javascript works correctly,

          >but when I add my second anchor and test it it'll go to the

          >first anchors position, but a few paragraphs down. If I add a third

          >it'll only move the page down a tad bit as if it wasn't moved at all.

          Is there enough room for the page to scroll? Links to specific locations within a page work by scrolling the page. If there's not enough height left on the page, it can't scroll and can give the impression that it's not working. Is this what's happening? If not, then you'll need to post the code.

          • 2. Re: Anchor issues using JQuery Mobile
            Mike91184 Level 1

            I am very sorry for all that raw html crud, I didn't know the format to paste code. I finally find a way for the javascript to work correctly. Since I was using one solid table for my layout it must've been causing issues, so I tried to use separate tables and it displayed the anchors and they are working like they should.

            • 3. Re: Anchor issues using JQuery Mobile
              bregent Most Valuable Participant

              No worries, glad you got it all working.