$('PARENT_ELEMENT').on('click','a[rel=XYZ]',function (e) {
$(this).replaceWith('some html');
});
Just make sure that 'PARENT_ELEMENT' exist when you bind your event. Safest way is to use 'body' or document as 'PARENT_ELEMENT'.
$('PARENT_ELEMENT').on('click','a[rel=XYZ]',function (e) {
$(this).replaceWith('some html');
});
Just make sure that 'PARENT_ELEMENT' exist when you bind your event. Safest way is to use 'body' or document as 'PARENT_ELEMENT'.
for(i=0,a=1; i<20; i++,a++){
//do something with var
a==10 ? a=1 : null ;
}
this excellent blog post explains exactly what you need, without any third party tools:
http://css-tricks.com/perfect-full-page-background-image
also, there are some jQuery plugins for that, including:
socketPort and httpPort are different. and no your gist didn't work for me. can you please check my code in this gist? thanks for your time. :) http.createServer(onRequest).listen(httpPort);
function onRequest (request, response) {
// stuff for serving files
}
and another function for serving socket.io:
io.sockets.on('connection', function (socket) {
// stuff for handling events
}
and these two are called in my index.js , Do you think I need to change this architecture? I am using node.js and socket.io. on the client side, I wrote a cookie like this:
var socket = io.connect('http://localhost:3000');
document.cookie="foo=bar";
socket.emit('this', { is: 'test'});
and on the server side, I need to be able to read from that cookie inside a socket.io connection, something like this:
io.sockets.on('connection', function (socket) {
socket.on('this', function(reqData){
console.log(socket.handshake.headers); // there is no cookies here!
});
}
a no-framework solution is preferred, any help is appreciated. thanks.
update: in this gist you can find my complete code.
I want to connect oracle 11gR2 and node.js 0.10.20. I use this package but i dont understand this part of installation process. Can you explain it?
# Replace /opt/instantclient_11_2/ with wherever you extracted the Basic Lite files to
echo '/opt/instantclient_11_2/' | sudo tee -a /etc/ld.so.conf.d/oracle_instant_client.conf
sudo ldconfig