facebook

I need some help trying to change the picture of a button !

💡
Our Forums Have Moved

For help with installation, bugs reports or feature requests, please head over to our new forums.
Genuitec Community on GitHub

  1. MobiOne Archive
  2.  > 
  3. Getting Help – General
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #339305 Reply

    i have this code until now:
    /*
    $(‘#m1-Codul_Rutier-setariBaraDeJos’).click(function(){
    $(‘#m1-Codul_Rutier-meniuBaraDeJos’).css(‘webkit-border-image’,’url(images/meniu_galben.png) 1 1 1 1 stretch stretch’);
    $(‘#m1-Codul_Rutier-despreBaraDeJos’).css(‘webkit-border-image’,’url(images/despre_galben.png) 1 1 1 1 stretch stretch’);
    $(‘#m1-Codul_Rutier-contactBaraDeJos’).css(‘webkit-border-image’,’url(images/contact_galben.png) 1 1 1 1 stretch stretch’);
    $(‘#m1-Codul_Rutier-setariBaraDeJos’).css(‘webkit-border-image’,’url(images/setari_alb.png) 1 1 1 1 stretch stretch’);
    });

    $(‘#m1-Codul_Rutier-contactBaraDeJos’).click(function(){
    $(‘#m1-Codul_Rutier-meniuBaraDeJos’).css(‘webkit-border-image’,’url(images/meniu_galben.png) 1 1 1 1 stretch stretch’);
    $(‘#m1-Codul_Rutier-despreBaraDeJos’).css(‘webkit-border-image’,’url(images/despre_galben.png) 1 1 1 1 stretch stretch’);
    $(‘#m1-Codul_Rutier-contactBaraDeJos’).css(‘webkit-border-image’,’url(images/contact_alb.png) 1 1 1 1 stretch stretch’);
    $(‘#m1-Codul_Rutier-setariBaraDeJos’).css(‘webkit-border-image’,’url(images/setari_galben.png) 1 1 1 1 stretch stretch’);
    });

    $(‘#m1-Codul_Rutier-despreBaraDeJos’).click(function(){
    $(‘#m1-Codul_Rutier-meniuBaraDeJos’).css(‘webkit-border-image’,’url(images/meniu_galben.png) 1 1 1 1 stretch stretch’);
    $(‘#m1-Codul_Rutier-despreBaraDeJos’).css(‘webkit-border-image’,’url(images/despre_alb.png) 1 1 1 1 stretch stretch’);
    $(‘#m1-Codul_Rutier-contactBaraDeJos’).css(‘webkit-border-image’,’url(images/contact_galben.png) 1 1 1 1 stretch stretch’);
    $(‘#m1-Codul_Rutier-setariBaraDeJos’).css(‘webkit-border-image’,’url(images/setari_galben.png) 1 1 1 1 stretch stretch’);
    });

    $(‘#m1-Codul_Rutier-meniuBaraDeJos’).click(function(){
    $(‘#m1-Codul_Rutier-meniuBaraDeJos’).css(‘webkit-border-image’,’url(images/meniu_alb.png) 1 1 1 1 stretch stretch’);
    $(‘#m1-Codul_Rutier-despreBaraDeJos’).css(‘webkit-border-image’,’url(images/despre_galben.png) 1 1 1 1 stretch stretch’);
    $(‘#m1-Codul_Rutier-contactBaraDeJos’).css(‘webkit-border-image’,’url(images/contact_galben.png) 1 1 1 1 stretch stretch’);
    $(‘#m1-Codul_Rutier-setariBaraDeJos’).css(‘webkit-border-image’,’url(images/setari_galben.png) 1 1 1 1 stretch stretch’);
    });
    */

    should i use the if statement, if yes then how should it be?
    hope to get some help cuz im a beginer i this 🙂 and thx for the time.

    #339329

    Stu Wade
    Member

    I found that changing the colours of buttons as you have done gave a rather poor result visually. My approach was to have two buttons in the same location (with differing colours) and to switch the visibility between the two as required. That is one was ‘hidden’ and the other was visible ‘inherit’.

    #339333

    hello and thank you for your replay but i think you didnt understand me.

    I have a MultiPage Widget with 20 pages and a ToolBar with 4 buttons (image button), for each button i have 2 images and a im trying to change the imagine of the button with “.css” in order to fake a TabBar.

    This is how i can change the imagine:
    $(‘#myButton).css(‘webkit-border-image’,’url(images/IMAGE ID.png) 1 1 1 1 stretch stretch’);

    #339340

    Brandon
    Member

    Try this:

    newUrl = “images/meniu_galben.png”; //make sure this is the correct page to your image file
    $(‘#m1-Codul_Rutier-meniuBaraDeJos’).css(‘-webkit-border-image’, ‘url(‘ + newUrl + ‘) 1 1 1 1 stretch stretch’ );

Viewing 4 posts - 1 through 4 (of 4 total)
Reply To: I need some help trying to change the picture of a button !

You must be logged in to post in the forum log in