Hi there,
I'm sure there is an easy way to do this so let me ask.
I have an "admin" page full of video thumbnials that I want to allow the user to sift through and pick which videos should be enabled or disbaled. To keep with current trends I'm using a little JQuery iphone ON/OFF switch/selector. Because there is no guarentee the amount of videos per page (its pulled form db, so could be 3 or could be 50) I would like to do the JQuery code for these selectors which is:
$('#vid-1').iphoneSwitch("on",
function() {
$('#ajax').load('/handle.php?vid_id=1&status=on');
},
function() {
$('#ajax').load('/handle.php?vid_id=1&status=off');
},
{
switch_on_container_path: '/img/iphone_switch_container_off.png'
});
Instead of repeating this x amount of times on the page for each video is there a generic way of enabling all divs ids that start with "vid-". I'm sure there is and I'm sure I've seen and used it before but can't think of the syntax.
Thanks,
Kevin