Trailmax Tech

Max Vasilyev: ASP.Net MVC development in Aberdeen, Scotland
Skip to content
  • My Talks
  • cacheCopy
  • NSaga
  • Cake.SqlServer
  • About

jQuery: check if data attribute is defined

Posted on October 9, 2012July 13, 2013 by trailmax

I did spend a bit of time to discover how to check if data- attribute is defined on an object, so might as well write it down.
It’s not a rocket science, and very googleable, but it’s my blog, right? I can write here whatever I want, right?
So here you go:

$(".some-class").data("width") !== undefined
Uncategorized   javascript, jquery
2

Tags

.Net asp.net Autofixture automation azure Azure-DevOps bat build server BuildServer c# cakebuild commands Dependency Injection di drivers eclipse EntityFramework git html https Identity iis java javascript jquery Linux microsoft mocking mvc OpenXml recipe regexp Registry script sql sql server stackoverflow testing tfs unit-testing Vista visual studio Windows Wireless XP

Blogroll

  • HR.Net Consaltancy and blog
  • My Git Cheat-Sheet
  • My Twitter
  • Wordpress Hosting

Recent Posts

  • Laundry Basket Bias
  • mstsc.exe vs HD screen
  • Windows Terminal
  • Using private NuGet feed with dotnet publish
  • Keyboard Shortcuts for Git in Visual Studio
Powered by WordPress | Theme: Bootstrap Basic