makfak

makfak supports this item

Supported

Popular questions for this item

How do I add images to the tabs?

SiteFeature supplies a callback function (called “endCreateFunction”) that gets executed after the DOM has been written to the page. This callback is automatically passed an object that contains all the info you need to reference things within SiteFeature.

Here’s the code…

jQuery(document).ready(function(){

    $('#preFeature').siteFeature({
        endCreateFunction: imgsInTabs
    });

    function imgsInTabs(opts){
        var $tabs = $('#' + opts.tabIdPrefix + 'Container a', '#' + opts.outputElementId),
            $imgs = $('#' + opts.imgBgIdPrefix + 'Container', '#' + opts.outputElementId);

        $.each($tabs, function(){
            var id = this.id,
                src = $imgs.find('#' + id).css('background-image').replace(/^url|[\(\)]|[\"]/g, '').replace(),
                $img = $('<img />').attr('src',src);
            $(this).find('h4').before($img);
        });
    }
});

Then add a little style and you’ll be all set.

#siteFeature #tabContainer img { position:relative; display:block; float:left; margin:10px 5px 5px; height:35px; width:35px;}

Contact the author

This author provides limited support for this item through this item's comments.

Item support includes:

  • Availability of the author to answer questions
  • Answering technical questions about item’s features
  • Assistance with reported bugs and issues
  • Help with included 3rd party assets

However, item support does not include:

  • Customization services
  • Installation services

View the item support policy

by
by
by
by
by
by