Forums

Overwriting thickbox js styling (2 posts)

  1. rebekahford
    Member
    Posted 1 year ago #

    I'm trying to attach a dynamic category to an element in thickbox.js. I have managed to attach it using php to an element within the content of the overlay but want to attach it to the outside element #TB_window or in particular #TB_title.

    I have used <div class="<?php foreach((get_the_category()) as $category) {echo $category->category_nicename. ' ' ;} ?>">to generate this successfuly within a php page but need to know the following urgently:

    1. Can I overwrite thickbox.js functions which I know live in wp-includes, by editing my functions.php in my theme, rather than having to hack the core?
    2. Can I change this line in thickbox.js line 203: jQuery("#TB_window").append("<div id='TB_title'><div id='TB_ajaxWindowTitle'>"+caption+"</div><div id='TB_closeAjaxWindow'><a href='#' id='TB_closeWindowButton' title='"+thickboxL10n.close+"'>
      to
      jQuery("#TB_window").append("<div id='TB_title' class='<?php foreach((get_the_category()) as $category) {echo $category->category_nicename. ' ' ;} ?>'><div id='TB_ajaxWindowTitle'>"+caption+"</div><div id='TB_closeAjaxWindow'><a href='#' id='TB_closeWindowButton' title='"+thickboxL10n.close+"'>
    3. or am i being really naive?

    any help greatly appreciated

  2. rebekahford
    Member
    Posted 1 year ago #

    anyone?

Topic Closed

This topic has been closed to new replies.

About this Topic