Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (function($) {
- var number="123456";
- function linkBuilder(abbreviation) {
- return "<a href='https://www.test.com/"+ abbreviation + "?sitenumber="+ number +"default'>Click here to visit "+ abbreviation +"</a>";
- }
- function linkBuilder2(abbreviation2) {
- return "<a href='https://www.test.com/"+ abbreviation2 + "?sitenumber="+ number +"default'>Click here to visit "+ abbreviation2 +"</a>";
- }
- jQuery(document).ready(function() {
- var fl = $(".first-link");
- if(fl.length > 0 ) {
- fl.html(linkBuilder(fl.data("abbreviation")));
- }
- var sl = $(".second-link");
- if(sl.length > 0 ) {
- sl.html(linkBuilder2(sl.data("abbreviation2")));
- }
- });
- })(jQuery);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement