Change color of a specific word generated by script [closed]

Insted of <font style=”font-color:#2ED7A2;”>’ + crypt_single_target_currency.match(/.*?\(([0-9a-z]+)\)/i)[1] + ‘</font> try <span style=”color:#2ED7A2;”>’ + crypt_single_target_currency.match(/.*?\(([0-9a-z]+)\)/i)[1] + ‘</span> the font tag isn’t supported in html 5 and you were calling “font-color” instead of just “color”

Why is jQuery not working properly? [closed]

Upon first glance, both cycle.js and your javascript code need to be in the page AFTER jQuery is included. Right now, they are before so they both generate errors that jQuery is not defined. Make sure that jQuery is included first before you try to use jQuery. In the future, I would also strongly suggest … Read more

jQuery functions work in console, but not live

Where are you using the jQuery code we see in question? If you are using it in header (head), I would recommend using: jQuery(document).ready(function(){ jQuery(‘.homepage_buttons_text a[href^=”http://danrobertsgroup.com/?attachment_id=1037″]’).each(function(){ jQuery(this).html(“<h1 class=”homepage_button_title”>Workouts</h1><span class=”homepage_button_title”>Books / DVD’s / Downloads</span>”); }); }); If you are using the code in the footer, the above replacement is still recommended and for each add_action hook … Read more

Adding css and js to a blank page created with custom template

In my theme functions.php at the end works for me: function themesCharles_enqueue_style() { wp_enqueue_style( ‘my-theme’, get_template_directory_uri() .’/myFiles/myStyle.css’, false ); } function themesCharles_enqueue_script() { wp_enqueue_script( ‘my-js’, get_template_directory_uri() .’/myFiles/myScript.js’, false ); } add_action( ‘wp_enqueue_scripts’, ‘themesCharles_enqueue_style’ ); add_action( ‘wp_enqueue_scripts’, ‘themesCharles_enqueue_script’ );

Dynamically determine URI to scripts and styles included with a class which could be added from plugin/theme/child theme/mu plugin

For plugins it is: $plugin_url = plugin_dir_url( __FILE__ ); This works even if wp-content is on a separate domain. You may get problems if your class is in a subdirectory of the plugin – you should probably make the __FILE__ a parameter for a function: public function get_plugin_url( $base = __FILE__ ) { return plugin_dir_url( … Read more

Socialite not displaying icons [closed]

kaiser pointed me to firebug (FF addon) which confirmed what I thought, the css/js files were not being loaded correctly. But everthing seemed ok. I copied the css into my main styles sheet and things started to look better (however, some things still didnt work). I re-did the tutorial (for the fourth time), but this … Read more

Javascript block in Twenty Twelve theme

By default when you use wp_enqueue_script the script is inserted into the <head> section. This is usually set in functions.php. The argument also has a footer option called $in_footer, if you set this to true, the scripts will instead be added to the footer section. In TwentyTwelve there are several calls to wp_enqueue_script with footer … Read more