Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

jQuery Code Being Removed on Server?

Featured Replies

Hi all,

 

I am working on a new site and as part of one of the pages I wanted a class to be added when someone scrolled a certain amount.

 

I had posted in another forum where somebody had coded up some jQuery that was working better than what I was using.

 

On the demo page of this new jQuery it was working fine. When I had added the code to my development site it seemed to be removing a small amount of code. I'm not familiar with jQuery so I don't really know what is going on.

 

Screenshots attached of what is going on.

 

error-message.png is what is displayed on the page.

 

dreamweaver-code.png is what the code looks like in Dreamweaver.

 

source-code.png is what is missing on the page.

 

It works when I upload a .html file with basic code in but when I add to my site the errors get displayed and what looks like, code removed. Because of that I would think that it has something to do with other code on the site but I'm not too sure.

 

Thought that somebody here might have an idea.

 

Cheers.

Al.

 

 

post-32004-0-59003000-1381334486_thumb.png

post-32004-0-12138600-1381334499_thumb.png

post-32004-0-00556600-1381334508_thumb.png

Remove the $ sign from the variable in both cases.

 

Looks like a weird PHP environment that doesn't require <?php tags to execute.

  • Author

Hi andy, thanks for the reply, sorry just getting back now.

 

If I remove $ the error is gone alright but the functionality doesn't work - as in the add class at specific scroll.

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.