How do I add Javascript and CSS files into WordPress?

I have the following html code: <script src=”js/jquery.vmap.js”></script> <script src=”js/jquery.vmap.world.js”></script> <script src=”js/jquery.vmap.sampledata.js”></script> <script> jQuery(‘#vmap’).vectorMap({ map: ‘world_en’, backgroundColor: null, color: ‘#ffffff’, hoverOpacity: 0.7, selectedColor: ‘#666666’, enableZoom: true, showTooltip: true, values: sample_data, scaleColors: [‘#C8EEFF’, ‘#006491’], normalizeFunction: ‘polynomial’ }); </script> <div id=”vmap” style=”width: 600px; height: 400px;”></div> How can I add the used Javascript (or CSS) file into my … Read more

Animate like Stack exchange frequently asked questions [closed]

Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it’s on-topic for WordPress Development Stack Exchange. Closed 8 years ago. Improve this question https://graphicdesign.stackexchange.com/about As you scroll down the page, images and text slowly fading. Is there a plug-in origin jquery like string that … Read more

Accessing Advanced Custom Fields with Repeater using jQuery instead of PHP

I am using Advanced Custom Fields (with repeater) and am currently using the following code to access the fields, i.e.: <?php if( have_rows(‘postage_prices’) ): ?> <ul class=”slides”> <?php while( have_rows(‘postage_prices’) ): the_row(); // vars $order_qty = get_sub_field(‘order_qty’); $strips_rp = get_sub_field(‘strips_rp’); $strips_ep = get_sub_field(‘strips_ep’); $roll_rp = get_sub_field(‘roll_rp’); $roll_ep = get_sub_field(‘roll_ep’); ?> <li class=”slide”> <?php echo $order_qty; … Read more

How can I use jQuery maphilight?

I need an interactive map in my WordPress blog and would like to use jQuery maphilight. I tested maphilight in a HTML file and it works great, but I want to use it in WordPress, so need to call the JS files and write some code like I used in the HTML file. How can … Read more

Add a class to a menu item depending on a body class

I need to have a class of current-menu-item added to a li with the id of #menu-item-127 if the body class is post-type-archive-team I can do this with jQuery – $(function(){ if ($(‘body’).hasClass(‘post-type-archive-team’)) { $(‘#menu-item-127’).addClass(‘current-menu-item’); } }); But it’s needed before jQuery loads to make something else work. Any ideas if I can do this … Read more

JQuery UI plugin not working in IE7?

I want to use the dialog box from this plugin, but it isn’t compatible for IE7. When I run it in Internet Explorer’s IE7 emulator, the dialog box renders weirdly. It’s partly transparent, draggable/resizable doesn’t work, and the title disappears. As far as I know, the problem seems related to one (or both) of these: … Read more