Welcome Guest, Not a member yet? Register   Sign In
[Solved] Codeigniter JQUERY
#5

Working now 


Code:
<script type="text/javascript">    
standardhtml = '';
standardhtml += 'You can also provide a ';
standardhtml += '<span id="url_text">link from the web</span>';

$('#hyperlink_text').html(standardhtml);

$('#hyperlink_text').on("click", "#url_text", function(){
    newhtml = '';
    newhtml += 'Link from the web ';
    newhtml += '<input class="form-control input-sm" placeholder="http://example.com/image.png" type="text">';
    newhtml += '<span class="separator"> | </span>';
    newhtml += '<span class="cancel" id="cancel">Cancel</span>';
    $('#hyperlink_text').html(newhtml);
});

$("#hyperlink_text").on("click", "#cancel", function() {
    $('#hyperlink_text').html(standardhtml);
});
</script>
There's only one rule - please don't tell anyone to go and read the manual.  Sometimes the manual just SUCKS!
Reply


Messages In This Thread
[Solved] Codeigniter JQUERY - by wolfgang1983 - 11-19-2016, 11:18 PM
RE: Codeigniter JQUERY - by Wouter60 - 11-20-2016, 12:51 AM
RE: Codeigniter JQUERY - by wolfgang1983 - 11-20-2016, 01:18 AM
RE: Codeigniter JQUERY - by Paradinight - 11-20-2016, 11:01 AM
RE: Codeigniter JQUERY - by wolfgang1983 - 11-20-2016, 05:59 PM



Theme © iAndrew 2016 - Forum software by © MyBB