Completed

Remove appended script on window resize (javascript)

What I want to do is when the browser window width is above 992px, to enable the script DOUBLE TAP TO GO for the menu. But when the browser window width becomes less than 992px to disable DOUBLE TAP TO GO script, because I want a single tap to go for the hamburger menu.

I managed to do this when the window is more than 992px... But when I switch my iPad to portrait mode (which is less than 992px) the DOUBLE TAP TO GO script is still active because there was no refresh on the page.

So when orientation changes I run the code.

Can you tell me how can I remove the DOUBLE TAP GO script on else? I can't find a way...

MY CODE

jQuery(document).ready(function($){

orientationChange();

});

function orientationChange() {

if([login to view URL]) {

[login to view URL]("orientationchange", function() {

///////////////////////////////////////////////////////////////////////

if([login to view URL]("(min-width: 992px)").matches) {

////////////////////////////////////////////////////////////////////// 1) DOUBLE TAP TO GO

(function( $, window, document, undefined )

{

var b = $.[login to view URL] = function( params )

{

if( !( 'ontouchstart' in window ) &&

![login to view URL] &&

![login to view URL]().match( /windows phone os 7/i ) ) return false;

[login to view URL]( function()

{

var curItem = false;

$( this ).on( 'click', function( e )

{

var item = $( this );

if( item[ 0 ] != curItem[ 0 ] )

{

[login to view URL]();

curItem = item;

}

});

$( document ).on( 'click touchstart MSPointerDown', function( e )

{

var resetItem = true,

parents = $( [login to view URL] ).parents();

for( var i = 0; i < [login to view URL]; i++ )

if( parents[ i ] == curItem[ 0 ] )

resetItem = false;

if( resetItem )

curItem = false;

});

});

return this;

};

})( jQuery, window, document );

jQuery( function()

{

jQuery( '#menu-top-menu li' ).doubleTapToGo();

});

///////////////////////////////////////////////////////////////////////

}

///////////////////////////////////////////////////////////////////////

else {

//REMOVE DOUBLE TAP SCRIPT FROM MEMORY

}

///////////////////////////////////////////////////////////////////////

});

}

}

Skills: Javascript, jQuery / Prototype, CSS, PHP, HTML

See more: script mouse resize picture, background image dynamically resize javascript, rollover image html resize javascript, postmessage window resize, css full page width window resize 100, slideshowpro director dynamic resize javascript, upload crop resize javascript, window unload javascript, remove click activate flash using javascript, script image hosting script imageshack resize, javascript window resize inner content, window resize pushes content, javascript open window resize image, javascript lock window resize, remove script tags text javascript, script type text javascript src http vk com away php utf 1&amp to http ow ly xatab window onload check mobile 80733 156268 scrip

About the Employer:
( 2 reviews ) Argos, Greece

Project ID: #20465639

Awarded to:

WebWars

Hello there, I have 9 years experience in web design and development and I am really looking forward to work on this project. In the meantime you can check my work here: https://www.freelancer.com/u/WebWars.html I More

€25 EUR in 1 day
(327 Reviews)
8.0

21 freelancers are bidding on average €29 for this job

suju8811

Hello, I read your job description very carefully and bid here. I already understood what you want and I can start immediately. As you can see my profile, I am a senior developer in this fields. I am sure I can finish More

€100 EUR in 7 days
(45 Reviews)
7.1
dezio1900

Hi, I have read code you provided, and I can do required change for you in single day. I have more than 10 years experience in javascript development. Please check my portfolio and reviews.

€20 EUR in 1 day
(59 Reviews)
6.0
jinxing4

⭐Dear Sir⭐ Nice to meet you. I am interesting in your project. I can build your project perfectly with my experience. I am full time developer and my goal was always delivery perfectly results on time I will do my bes More

€50 EUR in 2 days
(130 Reviews)
6.1
tiwariraushan71

Hi There, I can do it Now. I am PHP experts having combined experience of more Than 6 years in PHP Framework :- Prestashop,Magento, Wordpress, & BIgcommerce and already completed more than 100 projects successfully. More

€30 EUR in 1 day
(117 Reviews)
6.1
valor312

VERY EASY FOR ME As you can see in my review, I've done similar with yours Hello. I have read your description and I am so interested in your project. I am confident in your project and I can finish it clearly on time More

€30 EUR in 1 day
(74 Reviews)
6.1
fastestJohn

Hello. I have just read your project. https://www.freelancer.com/u/fastestJohn?w=f This is my profile. I am really interested in your project now. Because my skills are suitable for your project. I like the "Fastest" a More

€30 EUR in 7 days
(49 Reviews)
6.0
Lv7e

Hello. I know how to do that - I have actually read the code. But you will need to approve my bid on this project first. Feel free to contact me if you need any details.

€30 EUR in 7 days
(3 Reviews)
5.2
WebMediaPak

Hi Dear client I am ready to remove the appended script in javascript and I will give you 100% satisfaction with requirements. You can check my previous work and reviews on profile. Thanks

€20 EUR in 1 day
(43 Reviews)
4.7
TopDesigner315

Hello :) Thanks for your posting. I saw your description carefully. I am really good at JavaScript I am a web expert who have 8+ years of experiences. My skills are Html5,Css,Bootstrap,Javascript,Jquery,MySql,PHP such More

€19 EUR in 1 day
(13 Reviews)
4.2
santoshm143

Dear Hiring Manager! Wish you a very good day!!! After reviewing your post, I am very interested in that due to my experience. I’d like to be considered for your project position. I am an expert Database developer. As More

€30 EUR in 7 days
(7 Reviews)
4.2
BitzageTechHub

Greetings, my name is Ahmad. I am Head of Client Relations and a web-developer myself. I would love to have an opportunity to discuss your project with you. With over 5 years of experience in mobile/web design and dev More

€19 EUR in 7 days
(4 Reviews)
3.5
olrya

Dear sir. I have read your project details carefully. I am a web full stack developer. I can do your project, perfectly. My Target is best service to customer, credit is first, high quality result. I have 5+ years expe More

€30 EUR in 2 days
(12 Reviews)
3.5
shivangioffc

I have been through your requirement very well. I have done similar projects like yours. I have great experience in Mobile and Web Development. I'm quite confident that I can handle your project perfectly. My Core Ski More

€10 EUR in 2 days
(11 Reviews)
3.3
romancoder204

Hi. thanks for your posting. I'm very happy to have a chance of bidding your project. I have experience in development of the projects like yours If you hire me, I'll do my best for your project and finish greatly in a More

€30 EUR in 1 day
(10 Reviews)
3.3
AbhishekSingh08

Specialization in the following - Html5 and Css3 Bootstrap javaScript Angular Js React js React native MongoDb Mysql Nodejs jQuery Ajax PSD TO HTML Wordpress Give me one chance for proving myself. Thanks :)

€19 EUR in 1 day
(1 Review)
2.3
djenkinsdev

Greetings! I can most definitely help you solve your browser resize issue. I have well over a decade's worth of professional experience in the field and can help you get back on your feet. I look forward to speaking More

€30 EUR in 1 day
(5 Reviews)
2.5
olegsamsonov

⭐⭐⭐FOR THE BEST QUALITY, ONLY FOR YOU!!!⭐⭐⭐I have read your description carefully.⭐⭐⭐ I am very very interested in your project. I am an expert in Web and Mobile development with rich experience. I have special experi More

€30 EUR in 1 day
(5 Reviews)
1.7
doyeninfotech

Hey There !! I am having major 8+ years experience in Laravel Codeigniter PHP PHP5 HTML5 Wordpress Cake php CSS3 jQuery, Ajax cakephp MySQL laravel yii wordpress [login to view URL] html5 ecommerce Graphicdesign and also More

€19 EUR in 7 days
(1 Review)
0.7
codyjohnson0325

Hi!I'm very happy to have a chance of bidding your [login to view URL] can we talk? If we work together, I will satisfy you fully. Please give me 10 minutes of yours and share your work more details. Thanks & Regards.

€20 EUR in 2 days
(0 Reviews)
0.0
alexchinke97

I will do it, in a few of hours

€24 EUR in 1 day
(0 Reviews)
0.0