• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

My Monkey Do

A Log of Coding Solutions

  • Home
  • Web Hosts
  • Tools
  • About

jquery

jQuery add table row

April 21, 2012 by Webhead

Problem

How do you add a table row using jQuery?  A table has so many different elements in it that things might get screwy.

 

Solution

There is no one statement-to-use-on-all, but the below line is a pretty general answer and should solve your needs even when there are no table rows:

$('#myTable > tbody:last').append('<tr>...</tr><tr>...</tr>');

keywords: jquery add table row
source: http://stackoverflow.com/questions/171027/add-table-row-in-jquery

Filed Under: Coding Tagged With: javascript, jquery

IE nasty black on jquery fade

January 9, 2012 by Webhead

Problem

Fading a semi-transparent image in or out causes the whole image to go black before or after fadeIn and fadeOut in IE only.

 

Solution

You can set the opacity before the fadeIn or fadeOut.

 

source: http://stackoverflow.com/questions/1284163/jquery-ie-fadein-and-fadeout-opacity
keywords:  jquery fadeout ie black

Filed Under: Coding Tagged With: css, IE crap, jquery

prettyPhoto undefined description

November 15, 2011 by Webhead

Problem

I had “undefined” showing up in the description of my lightbox whenever I left out the “title” attribute in my link.

 

Solution

I am using jQuery 1.6.2, the examples used 1.4.2.   To resolve the problem, look to change something like this:

 

if(pp_descriptions[set_position] != ""){
				$pp_pic_holder.find('.pp_description').show().html(unescape(pp_descriptions[set_position]));
			}else{
				$pp_pic_holder.find('.pp_description').hide();
			}

to this:

if(typeof pp_descriptions[set_position] != 'undefined' && pp_descriptions[set_position] != ""){
				$pp_pic_holder.find('.pp_description').show().html(unescape(pp_descriptions[set_position]));
			}else{
				$pp_pic_holder.find('.pp_description').hide();
			}

 

search terms used:  prettyphoto undefined description
source: http://forums.no-margin-for-errors.com/discussion/1915/when-there-is-no-title-element-displays-undefined/#Item_3

 

 

Filed Under: Coding Tagged With: jquery, open source

IE Takes Time

September 1, 2011 by Webhead

IE has officially forced me to spend 50% more time to complete a project.  Bugs, workarounds, special IE filters, all contributed to the time.  The last 3 or 4 projects, I tracked my hours spent on IE.  Maybe Microsoft secretly hates other developers.

I have a new example demonstrating a few HTML 5 features like:

  • gradient
  • vertical text
  • shadow

Of course, IE is not yet a “modern” browser so it needs to use it’s little “filter” hack.  Leave it to IE to have a bug in it’s own hack.  Gradients and Shadows cannot be shown at the same time.  I haven’t really found a workaround yet.

http://mymonkeydo.com/example/chart_gradient_vtext_shadow.html

Filed Under: Random Thoughts Tagged With: css, html 5, IE crap, jquery

jQuery bgpos fix

August 12, 2011 by Webhead

Problem:

IE was throwing a ‘undefined’ error when using the jquery.bgpos.js script.  Here is an example of what it can do:

http://snook.ca/technical/jquery-bg/

Solution:

Found on Stack Overflow as usual, here is the fixed jquery.bgpos.js made especially for Microsoft Internet Explorer.

http://stackoverflow.com/questions/1780617/ie8-and-jquery-null-pointers

 

Keywords:  bgpos jquery ie

Filed Under: Coding Tagged With: IE crap, jquery

Share Buttons with jQuery

July 6, 2011 by Webhead

Simple as pie… Adding share buttons using jQuery and CSS:

http://www.webanddesigners.com/floating-share-box/

Filed Under: Coding Tagged With: css, jquery

  • « Go to Previous Page
  • Go to page 1
  • Go to page 2
  • Go to page 3
  • Go to page 4
  • Go to Next Page »

Primary Sidebar

Topics

apache apple bootstrap buddypress chrome cloudways cms css debug drupal eCommerce firebug firefox git gmail goDaddy google hosting htaccess html html 5 IE crap image iPad iPhone javascript jquery kinsta linux localization mac os x ms sql mysql open source optimize php php 7.2 svg tinymce woocommerce wordpress wpengine xss yii youtube




Categories

  • Coding
  • Off the Shelf
  • Plugins
  • Random Thoughts
  • Server Stuff
  • Tools
  • Uncategorized