I am not a javascript developer by any means what so ever, however am stuck behind a JS problem.
If somebody could help me figure out what the problem may be would be amazing.
The bit of script that is falling over is:
$('button').each(function()
{
var curr_title = $(this).attr('title');
if(curr_title.length > 0) $(this).button({ icons: { primary: curr_title } });
else $(this).button();
});
The error is
TypeError: Cannot read property ‘length’ of undefined.
This works no problems at all in previous releases of the code. however the only change is updated Jquery.
Does anyone know if this is likely to be the problem?
Again. Apologies if im being stupid.
$(this).attr('title');is undefined, so has no length. does your button contain a title, if your testing for wether the attibute exists try: