{"action":"created","issue":{"url":"https://api.github.com/repos/cheeriojs/cheerio/issues/943","repository_url":"https://api.github.com/repos/cheeriojs/cheerio","labels_url":"https://api.github.com/repos/cheeriojs/cheerio/issues/943/labels{/name}","comments_url":"https://api.github.com/repos/cheeriojs/cheerio/issues/943/comments","events_url":"https://api.github.com/repos/cheeriojs/cheerio/issues/943/events","html_url":"https://github.com/cheeriojs/cheerio/issues/943","id":190753913,"number":943,"title":"attr('attributeName',<number>) NOT WORKING...","user":{"login":"davidhbigelow","id":1648805,"avatar_url":"https://avatars.githubusercontent.com/u/1648805?v=3","gravatar_id":"","url":"https://api.github.com/users/davidhbigelow","html_url":"https://github.com/davidhbigelow","followers_url":"https://api.github.com/users/davidhbigelow/followers","following_url":"https://api.github.com/users/davidhbigelow/following{/other_user}","gists_url":"https://api.github.com/users/davidhbigelow/gists{/gist_id}","starred_url":"https://api.github.com/users/davidhbigelow/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davidhbigelow/subscriptions","organizations_url":"https://api.github.com/users/davidhbigelow/orgs","repos_url":"https://api.github.com/users/davidhbigelow/repos","events_url":"https://api.github.com/users/davidhbigelow/events{/privacy}","received_events_url":"https://api.github.com/users/davidhbigelow/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-11-21T15:44:42Z","updated_at":"2016-11-22T12:49:54Z","closed_at":"2016-11-22T09:07:33Z","body":"This appears to be a very basic problem with passing numeric values to attributes.  Here is an example:\r\n\r\n\r\n```\r\n\r\nvar $ = cheerio.load('<div>');\r\n\r\nvar myFloat = 99.99;\r\nconsole.log('MY FLOAT: -->'+myFloat+'<--')\r\n$('div').attr('shouldBeFloat',myFloat);\r\n\r\nvar myInt = 99;\r\nconsole.log('MY INT: -->'+myInt+'<--')\r\n$('div').attr('shouldBeInt',myInt);\r\n\r\n\r\nconsole.log($.html());\r\n```\r\n\r\nRESULTS:\r\n\r\n```\r\nMY FLOAT: -->99.99<--\r\nMY INT: -->99<--\r\n<div shouldBeFloat=\"99.99\" shouldBeInt=\"99\"></div>\r\n\r\n```"},"comment":{"url":"https://api.github.com/repos/cheeriojs/cheerio/issues/comments/262232412","html_url":"https://github.com/cheeriojs/cheerio/issues/943#issuecomment-262232412","issue_url":"https://api.github.com/repos/cheeriojs/cheerio/issues/943","id":262232412,"user":{"login":"davidhbigelow","id":1648805,"avatar_url":"https://avatars.githubusercontent.com/u/1648805?v=3","gravatar_id":"","url":"https://api.github.com/users/davidhbigelow","html_url":"https://github.com/davidhbigelow","followers_url":"https://api.github.com/users/davidhbigelow/followers","following_url":"https://api.github.com/users/davidhbigelow/following{/other_user}","gists_url":"https://api.github.com/users/davidhbigelow/gists{/gist_id}","starred_url":"https://api.github.com/users/davidhbigelow/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davidhbigelow/subscriptions","organizations_url":"https://api.github.com/users/davidhbigelow/orgs","repos_url":"https://api.github.com/users/davidhbigelow/repos","events_url":"https://api.github.com/users/davidhbigelow/events{/privacy}","received_events_url":"https://api.github.com/users/davidhbigelow/received_events","type":"User","site_admin":false},"created_at":"2016-11-22T12:49:54Z","updated_at":"2016-11-22T12:49:54Z","body":"I will just leave this here:\r\n\r\nhttp://api.jquery.com/attr/\r\n\r\n```\r\n**attributeName**\r\nType: String\r\nThe name of the attribute to set.\r\n\r\n**value**\r\nType: **String** or **Number** or **Null**\r\n```"}}
{"actor":{"display_login":"davidhbigelow"}}