beedo2008 Posted June 5, 2015 Share Posted June 5, 2015 (edited) I am creating a script where people can create a tour like Bootstrap tour without editing their website code. The code will be generate on my website and they just have to add a link on their website for the tour to work.The problem i am having is when the person website have the same for example div.page-container.page-header-fixed > div.page-footer > div.page-footer-wrap.bg-dark-gray > div.page-footer-holder.page-footer-holder-main > div.row > div.col-md-3 > h3 it will place the **tour pop up** on all items with the same structures like above code is their a way of telling the script what structures to apply to code to like maybewhat line the code onwhere on the page the structures is like **above x below y right side of z on the left side of f**or by what is contains inside of the divso that it won't show the tour on the wrong item Edited June 5, 2015 by beedo2008 Link to comment Share on other sites More sharing options...
dsonesuk Posted June 5, 2015 Share Posted June 5, 2015 Cant you just add a class specific to your html and css, such as div.MySpecificClass121Tour.page-container.page-header-fixed Link to comment Share on other sites More sharing options...
beedo2008 Posted June 5, 2015 Author Share Posted June 5, 2015 @dsonesukWould the user have to edit anything on their if i did it like below ?Because it depends on the person website how they made it websitediv.MySpecificClass121Tour.page-container.page-header-fixed Link to comment Share on other sites More sharing options...
dsonesuk Posted June 5, 2015 Share Posted June 5, 2015 No it shouldn't, their css would follow their css rules, your css and html with reference to specific class would only affect your css rules, it would only possibly affect their site only if they used your specific class which is highly unlikely. Link to comment Share on other sites More sharing options...
beedo2008 Posted June 5, 2015 Author Share Posted June 5, 2015 Sorry think I didn't say it clear Step one person enter their url step two person website load in a iframe step three the person click on the element they want to add the tour on Step four a pop up shows for you to enter the data you want to show in that tour Problem if the person website elements have the same structure like div > menu > h1 and all the other elements in the menu is the same it will select all of them. But in side the elements div > menu > h1 could have text "home" and the other could be "about us" or anything even image video etc depending on what they choose to add the tour on Link to comment Share on other sites More sharing options...
dsonesuk Posted June 5, 2015 Share Posted June 5, 2015 If they have similar structure but not specific class that you are using, their structure will remain the same because your specific class is only for your layout structure, cause they are not using your class at all. Link to comment Share on other sites More sharing options...
justsomeguy Posted June 5, 2015 Share Posted June 5, 2015 You can uniquely refer to any element with CSS selectors alone. Worst case, you can use this:http://www.w3schools.com/cssref/sel_nth-child.aspYou can also get the DOM path:http://stackoverflow.com/questions/5728558/get-the-dom-path-of-the-clicked-a Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now