I have a resizable function on my page:
$(function() {
$( "#droppable" ).droppable({
create: function( event, ui ) {$( this ).hide(0)}
});
$( "#droppable" ).on( "dropover", function( event, ui ) { $( this )
$( this ).text('¿Eliminar?')} );
$( ".panel" ).draggable();
$( "#droppable" ).droppable({
activeClass: "ui-state-default",
hoverClass: "ui-state-hover",
drop: function( event, ui ) {
$(ui.draggable).toggle( "scale" );
$( this ).show(0).delay(700).toggle( "clip" );
$( this ).addClass( "ui-state-highlight" )
.text('¡Eliminado!')
}
});
$( "#droppable" ).on( "dropout", function( event, ui ) { $( this )
$( this ).text('Arrastrar y soltar para eliminar')} );
$( ".panel" ).resizable({
minHeight: 119,
minWidth: 352,
maxHeight: 219,
maxWidth: 452
});
});
However, I only want to apply it when the resolution is higher than 1024. I tried applying it but encountered an error with a token ')' :
FULL ERROR: Uncaught SyntaxError: Unexpected token )
$(function() {
$( "#droppable" ).droppable({
create: function( event, ui ) {$( this ).hide(0)}
});
$( "#droppable" ).on( "dropover", function( event, ui ) { $( this )
$( this ).text('¿Eliminar?')} );
$( ".panel" ).draggable();
$( "#droppable" ).droppable({
activeClass: "ui-state-default",
hoverClass: "ui-state-hover",
drop: function( event, ui ) {
$(ui.draggable).toggle( "scale" );
$( this ).show(0).delay(700).toggle( "clip" );
$( this ).addClass( "ui-state-highlight" )
.text('¡Eliminado!')
}
});
$( "#droppable" ).on( "dropout", function( event, ui ) { $( this )
$( this ).text('Arrastrar y soltar para eliminar')} );
if ($(window).width() > 1024) {
$( ".panel" ).resizable({
minHeight: 119,
minWidth: 352,
maxHeight: 219,
maxWidth: 452
});
});
}