facebook

widget snippets image button: CLOSED

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

    rivercamel
    Member

    I am able to interrogate and reset a text widget

    alert($(‘#m1-marks-text1’).text()); WORKS
    $(‘#m1-marks-text1’).text(‘hello world’); WORKS

    But I want to change the src of an image button

    alert( $(‘#m1-marks-image2’).css(‘-webkit-border-image’) ); WORKS

    $(‘#m1-marks-image2’).css(‘-webkit-border-image’, ‘url(‘ + images/green.jpg + ‘) 1 1 1 1 stretchstretch’ )); DOES NOT WORK

    Must be doing something wrong but dunno what

    David

    #326912 Reply

    rivercamel
    Member

    Have also tried
    var newimage=’images/green.jpg’;
    $(‘#m1-marks-image2’).css(‘-webkit-border-image’, ‘url(‘ + newimage+ ‘) 1 1 1 1 stretchstretch’ ); DOES NOT WORK

    $(‘#m1-marks-image2’).css(‘-webkit-border-image’, ‘url( images/green.jpg ) 1 1 1 1 stretchstretch’ ); DOES NOT WORK

    #326926 Reply

    rivercamel
    Member

    THIS WORKS !

    a=’#m1-marks-image1′;
    $(a).css(‘-webkit-border-image’, ‘url(images/red.jpg) 1 stretch’ );

    #326927 Reply

    support-michael
    Keymaster

    @rivercamel

    Here’s a reference with other javascript snippets if you need to customize other widgets in the future:
    http://genuitec.com/mobile/docs/javaScriptSnippets/javaScriptSnippets.html#image_button_widget_snippets

    #326957 Reply

    rivercamel
    Member

    Yes that reference is the incorrect one !

    -webkit-border-image: url(images/foo.png) 1 1 1 1 stretch stretch;

    which does not work

    #326965 Reply

    support-michael
    Keymaster

    @rivercamel

    Thanks for the feedback. I will reconfirm our example on all of our test devices and update it if it is truly incorrect. Checkout the resources below that are consistent with our example.

    On what devices and browser(s) have you tested to determine that the proposed syntax is wrong?

    Here are references that are consistent with the syntax we proposed:
    http://css-infos.net/property/-webkit-border-image
    http://www.css3.info/preview/border-image/

Viewing 6 posts - 1 through 6 (of 6 total)
Reply To: widget snippets image button: CLOSED

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