» MarPloI have a html table and a button, like this:
<table id= tb_id border= 1 >
<th>Website</th>...Last post » AdminTo append a row in a html table, use this syntax:
$('#table_id > tbody:last').append('<tr>...</tr>');
And to hide the pressed...
» MarPloI'm trying to dynamically add and remove items with jQuery when I press the Append /Remove buttons.
This is the html code:
<ul id= lists >...Last post » AdminUse the append() and remove() jquery methods, like in this example:
<ul id= lists >
<li>List Item 0</li>
I have an array defined something like this:
var countries...Last post » AdminUse the JSON object methods.
- To convert an object to a string, use JSON.stringify() :
var json_string = JSON.stringify(your_object, null, 2);
» MarPloI want to do something like this:
$( .chkox ).checked(true);
$( .chkox ).selected(false);
I wish to set the checked value to check or uncheck...Last post » AdminUse the prop() method.
$('.chkbox').prop('checked', true); // checking
$('.chkox').prop('checked', false); // unchecking
And if you want to check...
Something like this:
» MarPloIs there any way I can modify the URL of the current page without reloading the page?
I only need to change the portion after the domain, when a...Last post » AdminYou can use the history.pushState() method to change the url address without refreshing the page.
It works in modern browsers which suport HTML5....
» MarPloI have written a code that adds a text in canvas on clicking a button.
And i want to display this text for lets say 2 seconds. How can I make the...Last post » AdminYou have to use setTimeout() to call a function, after a given time, that clears the canvas content.
Here's a simple demo for writing and clearing...
» MarPloHi all,
And, if it's possible, to change...Last post » AdminWith self.innerWidth and self.innerHeight you can get the window's width and height. Then, with resize event you can detect when the window is...
» MarPloI have two DIVs that I need to know the calculated browser distance (in width and height) of them.
<div id= dv1 >div...Last post » AdminUse the offset() function.
Something like this should work:
<div id= dv1 >div 1</div>
Some text ...<br>
<div id= dv2 >div...
» MariusI am using a jQuery script that adds dynamically a Div in the DOM. I am trying to ad onclick event for this div.
<div class= ui23...Last post » AdminThe live() method for registering events in jQuery is deprecated. Use instead the on() method.
This is called event delegation ....
» MariusHi there,
Does anyone know how to add option in web page to change the css theme?
For example, i have two css files: light.css , and dark.css . I want to...Last post » AdminWelcome
- Add an id to the html <link> tag which loads the css file.
- Create a <select> with...
Let's say I clicked a button and it will scroll down or scroll up to a...Last post » MarPloHi,
To scroll to a specified element, use the element.scrollIntoView() method (this method scrolls the current element into the visible area of the...
» MariusHow can I dynamically set /modify the values of certain form elements, more specifically certain input text fields? So far, whenever I load my html...Last post » MarPloHi,
Add an ID to the input text field, for example:
<form id= form1 >
<input type= text name= q01 id= id_i1 maxlength= 1 />...
» mowgliI see this is a very young forum, I came here looking solutions about Fotorama, anyway I had more answers here in few days that on the big...Last post » AdminHi,
That code not works because you have the thumbs in <img> tag, but in jQuery you refer to a ( $('.my-thumbnails a') ).
Try change with:...
» mowgliI really like and use Fotorama. In this site is posted a full and very good explanation of it. Thanks to the author! I downloaded and wanted to use...Last post » mowgliWow, you're full right! After working on it for 6 hours I found the same solution and I came here to write it. Maybe if I came here before, I'd see...
How can i st into a variable, for example an Array with two elements, the ID of the first and the last clicked Div which is into a parent DIV....Last post » AdminHi,
I think you can use this code.
<div id= parent >
<div id= id1 >
<div id= id2 >
<div id= id3 >
<div id= id4...
I tryed with onmouseover event, but I...Last post » AdminHi,
Try this code.
<div id= content >
<div id= id1 >
<span id= id2 >
<div id= id3...
I have a html table with data from mysql database.
To each row in the html table there is an edit button. When i click on the edit button, I...Last post » AdminHi,
Here is a simple and easy example:
» MariusI have a tabs effect on a web page and when the page is refreshed it loses the last active tab and goes back to the first tab.
How to make so after...Last post » AdminHi,
You can add data in...
I have a function sendAjax() which makes an Ajax request (with jQuery). How can I return the response from sendAjax()?
I tried to return the...Last post » MarPloHi,
I usually use a callback function that is passed as argument to the Ajax function.
The callback function is accessed when success, receives the...
I have a Div with some content and other html tags inside.
How can I get all the text content of this Div, without the html tags?
I ussed...Last post » AdminYou can use this:
<div id= d_id >
Some content ...
<p>Other html element.</p>
<span>Text in Another html...
<table...Last post » AdminHi
Then, use JSON.stringify(array) to...
How can I move the window scrollbar vertical position up or down by a specified number of pixels?
I'm using this function to get the scrollbar...Last post » MarPloHi
There are various ways to set tthe scrollbar position. For example, you can use the scrollTo(x, y) function, or scrollTop property for vertical...
I am trying to drag a table row and to drop it in a similar table (of same table structure).
I am trying to implement with jQuery UI draggable....Last post » MarPloHi,
Check the code example from this page: jQuery Drag and Drop Rows between two similar Tables