How do i make a jQuery script that toggles visibility of a div and at the same time toggles anchor text of a button?
function toggle(user_id) {
e = document.getElementById('toggleUserinfo_' + user_id);
a = document.getElementById('displayUserinfo_' + user_id);
if (e.style.display == 'block') {
e.style.display = 'none';
a.innerHTML = ‘Open';
} else {
e.style.display = 'block';
a.innerHTML = ‘Close';
}
}
I tried to search for it and came up with the following. However i want something more clean and based on jQuery instead of javascript. I need the script to show more information in the table with a button here
.
Any ideas or suggestions?
]]>function toggle(user_id) {
e = document.getElementById('toggleUserinfo_' + user_id);
a = document.getElementById('displayUserinfo_' + user_id);
if (e.style.display == 'block') {
e.style.display = 'none';
a.innerHTML = ‘Open';
} else {
e.style.display = 'block';
a.innerHTML = ‘Close';
}
}
I tried to search for it and came up with the following. However i want something more clean and based on jQuery instead of javascript. I need the script to show more information in the table with a button here.
Any ideas ?
]]>angularjs timeout
http://bit.ly/2aTqtOF part 1 and 2
The explanation about observables was short and clear.
If anyone has any other source for this topic or for learning Angular 2 in general, it will still help me a lot.
Cheers!
Thanks
]]>Could anyone help me?
]]>I'm new to php and if someone could help me with a few questions it would be greatly appreciated!
I have an active punBB forum and I would like to use the login throughout the rest of the site.
We are adding some additional features that I would prefer users had to register for but I would like the registration to be universal throughout the site.
What I would like to be able to do is to have something on each page to show that they are logged in and if not a redirect to the forum sign in that would send them back to their original pager after logging on.
I don't know if this is possible but if anyone could point me in the right direction that would be awesome!
Thanks you for taking the time to read this.
]]>(function(con) {
var oNum = new Number(2);
var oNPi = new Number(Math.PI);
console.log('Binary representation of 2: ' + oNum.toString(2)); //Prints 10
console.log('Value of Pi: ' + Math.PI); //Prints value of Pi
console.log('Value of Pi rounded to 4 decimal places: ' + oNPi.toFixed(4));
})(console);
More about Number object at MDN https://developer.mozilla.org/en-US/doc … cts/Number
]]>(function() {
console.log('Value of Pi: ' + Math.PI);
console.log('Random number 0-6: ' + Math.floor(Math.random() * 6));
console.log('Random number 1-6: ' + Math.ceil(Math.random() * 6));
})();
Here too I am using Nodejs and closures.
Note that floor is used to generate random numbers starting from 0; where as ceil is used to generate random numbers starting from 1.
More on Math object available from MDN https://developer.mozilla.org/en-US/doc … jects/Math
]]>(function() {
var oDate = new Date();
var date = oDate.getDate();
var mnth = oDate.getMonth();
var year = oDate.getFullYear();
var hrs = oDate.getHours();
var min = oDate.getMinutes();
console.log('Date: ' + date + '/' + mnth + '/' + year);
console.log('Time: ' + hrs + ':' + min);
})();
So, this is the code to display date and time using Javascript.
Note that I am using Nodejs, and so using console.log to display output.
The topic introduces useage of Date object to display current date and time based on users system.
The topic also introduces closures, a really interesting feature in javascript.
More details on Date object from MDN https://developer.mozilla.org/en/docs/J … jects/Date
]]>Привет! Ктонить может помочь с кодингом темы для форума по эскизу и подсоединением форума к сайту? Вдобавок нужно запрограмить относительно простой сайт на врдпрессе или не на вордпрессе?
]]>Yes, I've tried using HTML Tidy and Page Valet - but they break my pages and render my pages un-viewable.
What would a typical cost be for someone to review the site, fix the coding errors and generally clean everything up? I want it to be cross platform functional and look the same on every browser.
If someone is interested in doing this at a decent price, let me know - the site is www.intelifuel.com
Now, I have anti-right click enabled on the site because one of our competitors was stealing images - there are other ways of looking at the source code, or, if you are interested - PM me and I'll send you a sample of the code to see if you are interested in cleaning things up.
]]>1. add banner under first post and on right side of theme
2. enable a area to add html
Thanks
Luke