You might have seen text editors where you can bold a text, italic a text etc… The perfect example of this the Blogger Post Text Editor.
We have two files, index.html which contains the HTML code and texteditor.js which contains the jQuery code. You should include the texteditor.js in index.html.index.html
... [READ MORE]Toggle Element visibility using a little piece of code – Jquery Toggle
You can do this without the if statement. You can do this in just a line of code.
For example : if we want to toggle the visibility of a div with the id sh.
$("#sh").toggle();
If the div #sh is hidden the code above code will make it visible and if it is visible the code will hide the div #sh.
Jquery ExtAjax Plugin : Submit forms to external files using Jquery
This Jquery Plugin will help you to submit a form to a external file without refreshing the page.
Requirements
Here’s how the HTML file will look like:
... [READ MORE]
Refresh a Div container in equal intervals of time
jQuery Code
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script>setInterval(function() {$('#refreshdiv').load('divcontainer.html')}, 10000);</script>
divcontainer.html
This is loading in the div #refreshdiv.
This example will load divcontainer.html in the div #refreshdiv and refresh the div after 10 seconds.
If you want to change the file to load replace divcontainer.html in the jquery code to the file name you want to use.
If you want to change the number of seconds, replace 10000 with the number to refresh(Must be in milliseconds).
If you want help comment on this post.