Home > Features > Try Getting Out of a Bind by Going Live • Bookmark   • Newsletters   • Register Search Options


Try Getting Out of a Bind by Going Live

Try Getting Out of a Bind by Going Live

October 1, 2011
Text size: 
View in Digital Mag
Get XBIZ News
XBIZ Research
Will virtual reality boost the paysite market?
Yes, it will soon
Yes, but in a few years
Out of 179 votes. Results based on votes submitted by members of XBIZ.net social network.

" One of its biggest benefits, however, is that .live() supports event delegation such as may be found in dynamic web environments. "

An alternative way to code event handling in jQuery (.live instead of .bind) may offer benefits for certain applications.

Bind (api.jquery.com/bind/) is a means of attaching an event handler to an element. The command has an antithesis, .unbind(), which will remove a previously attached event handler from a specified element. Together, these commands allow jQuery to automate and alter actions in response to events such as a click or mouse over; for an easy example:

$('#test').bind('click', function() {
alert('You clicked on the element "test"');

The code above binds the click event to an element, such as a div, with an ID of “test” — clicking on that element will now launch an alert dialog box in response. Using jQuery also allows shortcuts for binding standard event types, such as enabling the use of .click() in place of .bind('click').

Multiple .bind() events can be scripted and their handlers readily manipulated, making this an efficient technique for accomplishing a wide range of tasks.

But is it always the best choice?

Live (api.jquery.com/live/), a variation of .bind(), offers an alternative method for attaching event handlers to specified elements.

According to jQuery.com, “When .bind() is called, the elements that the jQuery object refers to get the handler attached; elements that get introduced later do not, so they would require another .bind() call.”

Live mitigates this need.

Like .bind(), the .live() command has an antithesis, .die(), which removes previously attached event handlers from their assigned element.

One of its biggest benefits, however, is that .live() supports event delegation such as may be found in dynamic web environments.


Cam Model Megan Kroft Dreams Big at Studio 20

Hey guys! Oh, I hate when I say that, all we cam girls say that, it’s beginning to sound so cliché. Hey! Hello! People from the industry, cam girls, cam boys, hello! I’m Megan Kroft.... More »

Rich Girls Offers Pro Cam Modeling Tips

The live camming industry offers endless opportunities to earn signficant sums of money and afford a luxurious lifestyle, but only with tireless efforts and non-stop perseverance. To be an elite cam model... More »

CBT Takes Testicular Play to the Next Level

CBT is an acronym often associated with cognitive behavioral therapy or computer-based training, but in the BDSM world CBT stands for none other than “cock and ball torture.” Those four little... More »
Stay informed of the latest industry developments. Get XBIZ newsletters delivered to your inbox. Subscribe today!
Enter email address:

* To manage existing subscriptions click here.

Submit your press release to
multiple news outlets with 1 click.
Subscribe to RSS news feeds or
add free content to your website.
Access XBIZ news and articles
with your mobile device.
Access the latest issues of the industry's leading trade publications in digital form. View online or download for offline viewing.


Latin America Adult Business Expo

Jul 10 - Jul 12
Cartagena, Colombia

ANME Founders Show

Jul 16 - Jul 18
Los Angeles Marriott Burbank Airport


Aug 03 - Aug 06
Montreal, Quebec

XBIZ Berlin 2017

Sep 11 - Sep 14
Berlin, Germany
Everyday thousands of business professionals browse XBIZ's industry directory for quality products and services. Not listed yet? Your company could be losing potential new business. Submit your company today!
Use XBIZ RSS feeds to stay informed of the latest industry developments or as a content syndication tool for your website!