Styling the Sign Up Page

21 views
Skip to first unread message

Mark Billion

unread,
Aug 14, 2017, 10:19:28 AM8/14/17
to web2py-users
I have Jquery that works fine to style the user/login page....

$( document ).ready(function() {
    $(":submit").addClass( "btn btn-default" );

    $(".btn").css('margin-right', '10px');
    $(".w2p_fl").attr('align', 'right');
    $( "form>table" ).prepend( '<tr><td colspan="2"><figure class="form__image"><img src="/welcome/static/css/images/ico-dollar-happy-large.png" width="72px" alt=""></figure></td></tr>' )
});


But I cant for the life of me get it to apply when I hit the sign up button.  This is what Im using, but Ive also tried form and even document dot change....

$(".form-sign").change(function(){
    $(":submit").addClass( "btn btn-default" );

    $(".btn").css('margin-right', '10px');
    $(".w2p_fl").attr('align', 'right');
    //$( "form>table" ).prepend( '<tr><td colspan="2"><figure class="form__image"$

  $( "form>table" ).prepend( '<tr><td colspan="2"><figure class="form__image"><img src="/welcome/static/css/images/ico-dollar-happy-large.png" width="72px" alt=""></figure></td></tr>' )

Any thoughts?

Anthony

unread,
Aug 14, 2017, 10:39:08 AM8/14/17
to web2py-users
The .change() method sets up a handler for changes in input, select, and textarea elements, not for clicking buttons. If you want a change to happen when the button is clicked, set up a click handler or maybe simply a submit handler.

Anthony
Reply all
Reply to author
Forward
0 new messages