• 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

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Overwriting thickbox js styling’ is closed to new replies.