A Final Answer
Monday, January 31, 2011 at 5:42PM OK, we have a final, definitive answer for the question of the .data() arguments question.
Joe Paris | Comments Off |
Monday, January 31, 2011 at 5:42PM OK, we have a final, definitive answer for the question of the .data() arguments question.
Sunday, January 30, 2011 at 12:17PM The Visual Studio documentation file for jQuery 1.4.4 can be downloaded here.
Saturday, January 29, 2011 at 10:45AM JScript Editor Extensions (free)
This one adds four new features to Visual Studio:
Tuesday, January 25, 2011 at 3:25PM As far as I can tell, the reason we couldn't get the initial demo to work properly is that the book is incorrect: the .data() function does not allow a function for its value parameter. To obtain the effect we were looking for you would need code as follows:
$(function () { // document ready handler
$('li').each(function (i) {
$(this).data('data-joe', $(this).text())
})
$('li').click(function () {
alert($(this).data('data-joe'));
})
});
Or, even better...
$(function () { // document ready handler
$('li').each(function (i) {
$(this).data('data-joe', $(this).text())
}).click(function () {
alert($(this).data('data-joe'));
})
});
I also had difficulty getting the wrap() family of functions to work. This is because I was putting them outside of the document ready hander and they were never being called. Calling the following code will result in a border around the unordered list on the page.
$('ul').wrap('');
$('div.new').css({ borderStyle: 'solid', borderWidth: '5px' });
You can also use the following short-hand version:
$('ul').wrap('');
$('div.new').css({ borderStyle: 'solid', borderWidth: '5px' });
On a final note, I've overheard some comments which lead me to believe that some of you are confusing the .data() method and the jQuery.data() method. See the documentation to refresh yourselves on the difference.
Tuesday, January 11, 2011 at 3:15PM Here is the correct way to apply multiple CSS rules with one call to the .CSS() wrapper method. Note the JavaScript-style syntax for the normally dashed properties (font-weight becomes fontWeight and font-style becomes fontStyle). I've broken the statement across multiple lines for readability.
$("Hi there!
")
.css({color: 'red', fontWeight: "bold", fontStyle: "italic"})
.insertAfter("#followMe");
Saturday, March 13, 2010 at 10:27AM Click here to download a Windows-compatible, binary version of Lynx. Extract .zip the file to a folder and run the program from there. No installation needed.
Wednesday, March 10, 2010 at 8:46AM This time from DailyTech. The InformationWeek interview is also worth reading.