user701254
user701254

Reputation: 3953

Right align new hyperlink

Is it possible to add a new hyper link using jquery/javascript right aligned to "View Results" in below script ?

This is very long test question to test how polldaddy handles questions that exceed that normal length............ yes a very long question indeed..............

In below example there is a new hyper link with same name "View Results"

enter image description here

I think I need to modify class - 'pds-view-results'

http://jsfiddle.net/25LjE/8/

Upvotes: 0

Views: 58

Answers (2)

Ahsan Rathod
Ahsan Rathod

Reputation: 5505

See this demo: http://jsfiddle.net/rathoreahsan/25LjE/14/

JQUERY:

$('.pds-view-results').after('<a href="#">test</a>')

Initialization:

$(document).ready(function(){
    $('.pds-view-results').after('<a href="#">test</a>')
});

OR

$(function(){
    $('.pds-view-results').after('<a href="#">test</a>')
});

OR

$(window).load(function(){
    $('.pds-view-results').after('<a href="#">test</a>')
})

Upvotes: 1

defau1t
defau1t

Reputation: 10619

Adding the below piece of jquery should do it:

$(function() {
   $("span.pds-links a").addClass('pds-vote-button');
    $("span.pds-links").css("display","inline");
});

DEMO

Upvotes: 0

Related Questions