I'm trying to get a css property that was dynamically set with jquery.
Consider this code :
$(document).ready(function(){
$("#clickme").click(function(){
$("#myTable").css('borderStyle','solid');
$("#myTable").css('borderColor','black');
$("#myTable").css('borderWidth','3px');
});
$("#clickme2").click(function(){
alert($("#myTable").css('borderWidth'));
});
});
Clicking on clickme button will set the table myTable with the expected properties (3px solid black), but then clicking on clickme2 won't get the 3px value ! Do you know any fix ?
I read here Can jQuery get all CSS styles associated with an element?
that a solution could be using the .style of the DOM element, but if jquery could do it, I would prefer the jquery way ...
(the wysiwig for stackoverflow is a very good idea ;))