Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
<!--<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6/jquery.js"></script>-->
<script>
//<![CDATA[
(function ($) {
'use strict'
var content = $(
'<div>' +
'<h1>это мой новый супер контент</h1>' +
'<p>я его долго холил и лелеел</p>' +
'<p>даже есть одна <span class="TheButtonStub"></span> :-)...</p>' +
'<\/div>'
)
var the_button = $('<a href="#">Кнопочка<\/a>')
the_button.click(function (event) {
event.preventDefault()
alert('вот вы и нажали на эту кнопочку! :-D')
})
content.find('.TheButtonStub').replaceWith(the_button)
$(function () {
$('.Page').empty()
$('.Page').append(content)
})
})(jQuery)
//]]>
</script>
<div class="Page">Loading...</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.