How can I assign the content of a variable to another variable successfully? Here is what I have tried so far:
var className = $($(this).attr("class"););
$('.content').html(className)
EDIT:
Let's assume that the end value for "var className = $($(this).attr("class"););" is point1
point 1 contains:
EDIT 2: (CONTAINS FULL CODE)
<div class="content"><h1>testing hello world</h1><div class="position"> <div class="point1"> test<br> awewa<br> TEST <h1> test </h1> </div></div></div>
<script type="text/javascript">
var point1 = '<div class="content"><h1>testing hello world</h1><div class="position"> <div class="point1"> test<br> awewa<br> TEST <h1> test </h1> </div></div></div>';
var className = "Broken";
$('.content [class] [class]').click(function () {$(this).fadeTo(250, 0.25, function () {
className = $(this).attr("class");
$('.content').html(className)
$(this).fadeTo(250, 1.00);
});}
);
</script>
var point1 = '<div class="content"><h1>testing hello world</h1><div class="position"> <div class="point1"> test<br> awewa<br> TEST <h1> test </h1> </div></div></div>';
"$('.content').html(className)" needs to contain the string in point1 classname