fancybox - combine jquery rules -


i have jquery

$('#1').fancybox({ 'width': '50%', 'height': '90%', 'autodimensions': false, 'type': 'ajax', 'ajax': {     datafilter: function(data) {         return $(data).find('.news:first')[0];     } } }); $('#2').fancybox({ 'width': '50%', 'height': '90%', 'autodimensions': false, 'type': 'ajax', 'ajax': {     datafilter: function(data) {         return $(data).find('.news:eq(1)')[0];     } } }); 

is there possibility combine these 2 1

thnx

your biggest problem datafilter try this:

$('#1, #2').each(function(i, el) {   $(el).fancybox({     'width': '50%',     'height': '90%',     'autodimensions': false,     'type': 'ajax',     'ajax': {       datafilter: function(data) {         return $(data).find('.news:eq(' + + ')')[0];       }     }   }); }); 

Comments

Popular posts from this blog

c++ - Is it possible to compile a VST on linux? -

java - Output of Eclipse is rubbish -

jquery - Confused with JSON data and normal data in Django ajax request -