Answer the question
In order to leave comments, you need to log in
Whether it is possible to take out on a class, url links in one file?
Good time of the day.
I have a question. Have a site in html5, it has a lot of pages and url links.
And the question is, how can the class, url of the link be put into one file?
To change links faster.
Where should I look for php or jquery?
Answer the question
In order to leave comments, you need to log in
If I understood correctly from the example above, then yes it is possible through jquery, only the selector must be set correctly.
For the example above it would be:
Put it in a separate .js file included after jquery.
And wrap in:
$(function(){
$(".link_1").attr("href", "http://www.facebook.com/");
});
Let's say many html5 pages have code
whether it is possible on a class, url of the link to take out in one file?
$(".link[href]").attr("href", "http://www.facebook.com/");
Excuse me, a newbie, but I'm more of an adherent of storing url'y in the database.
If you have so many urls on the page and they are constantly changing, I don’t think that it will be convenient for you to get into the page code every time, or even if you put it in a separate js.
And you can pull out with the usual php selection
. Well, if the site is on your host, and if not? ...
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question