The forum of the forums

Would you like to react to this message? Create an account in a few clicks or log in to continue.
The forum of the forums
4 posters

    change bookmarks image

    Richard.
    Richard.
    Forumember


    Male Posts : 249
    Reputation : 12
    Language : English,Romanian
    Location : Durham, NC - USA.

    Solved change bookmarks image

    Post by Richard. December 31st 2011, 2:00 am

    How can i change the imagines from the Blog bookmark, SS:change bookmarks image Untit164
    Richard.
    Richard.
    Forumember


    Male Posts : 249
    Reputation : 12
    Language : English,Romanian
    Location : Durham, NC - USA.

    Solved Re: change bookmarks image

    Post by Richard. January 1st 2012, 7:34 am

    bump
    FL.ux
    FL.ux
    Forumember


    Male Posts : 841
    Reputation : 18
    Language : I hope I could be a FM staff :'(
    Location : I shall fly to the subterranean sky.

    Solved Re: change bookmarks image

    Post by FL.ux January 1st 2012, 7:41 am

    i think there's no way change bookmarks image Qwert18
    avatar
    robot_boy18
    Forumember


    Male Posts : 107
    Reputation : 7
    Language : English
    Location : Greenville, South Carolina, USA

    Solved Re: change bookmarks image

    Post by robot_boy18 January 1st 2012, 8:48 am

    I give you the example for twitter Wink Take a look at this css
    Code:
    #bookmarks a img.twitter {background-image:url('your image url');}
    avatar
    Guest
    Guest


    Solved Re: change bookmarks image

    Post by Guest January 1st 2012, 12:56 pm

    Try to add in your JavaScript management:
    Code:
    jQuery(document).ready(function() {
        jQuery('div#bookmarks a img').each(function() {
            if(jQuery(this).attr('src') == 'LINK_ORIGINAL_IMAGE') jQuery(this).attr('src', 'LINK_NEW_IMAGE');
        });
    })
    So, this code works very simple:
    jQuery('div#bookmarks a img') = This code give the css selectors;
    if(jQuery(this).attr('src') == 'LINK_ORIGINAL_IMAGE') = If the image attribute src from img tag that are selectors (div#bookmarks a img) is a certain image link replace that attribute's src value with new image;
    jQuery(this).attr('src', 'LINK_NEW_IMAGE'); = As I said below, this code replace the value's src attribute. Smile

    I give you an example with first image: change bookmarks image Twitter (https://2img.net/i/fa/social_bookmarking/twitter.png)

    Code:
    jQuery(document).ready(function() {
        jQuery('div#bookmarks a img').each(function() {
            if(jQuery(this).attr('src') == 'http://2img.net/i/fa/social_bookmarking/twitter.png') jQuery(this).attr('src', 'http://i.imgur.com/8xvmW.gif');
        });
    })
    Enjoy! Smile
    Richard.
    Richard.
    Forumember


    Male Posts : 249
    Reputation : 12
    Language : English,Romanian
    Location : Durham, NC - USA.

    Solved Re: change bookmarks image

    Post by Richard. January 1st 2012, 4:04 pm

    Thanks Gassy.
    avatar
    Guest
    Guest


    Solved Re: change bookmarks image

    Post by Guest January 1st 2012, 4:16 pm

    My pleasure. Smile
    Sanket
    Sanket
    ForumGuru


    Male Posts : 48766
    Reputation : 2830
    Language : English
    Location : Mumbai

    Solved Re: change bookmarks image

    Post by Sanket January 1st 2012, 7:06 pm

    Topic Solved & Locked

      Current date/time is November 11th 2024, 9:26 pm