Disable JavaScript for specific section - javascript

Hi so I'm working on a little project and I keep running into an issue with my script I have used it in the past with no problems but this time it's affecting my one section/div in a very weird way.. It just isn't there.. All the others are fine but this one.. so is there maybe a way to disable this script for that selected bit if code?
Note I only want to disable the one script for that one section..
Thanks in advance, I'm new so sorry if I'm doing this wrong xD

If you are intending to prevent scripts in a page from running in a certain section of your webpage, wrapping it up in an iframe will do.

Related

Wordpress HTML/CSS not displaying correctly - no changes made

I am having trouble identifying a problem and it is driving me crazy. If this is a poor question or in the wrong place please have mercy, I am exhausted trying to figure this out.
Here is how my website is displaying: My Site
And here is how it is supposed to look:
Archive of Page
Nothing has changed as far as I can tell. I have disabled plugins, re-uploaded them there. My mind is boggled!? It looks the same (code) but appears different. What am I missing!?
I happened to get this as well, what you should do is to redownload the layout, thats what solved my issue. I remember adding 1 line to css and removing it, the layout got stuck and refused to update, so that was my solution. I hope someone else can give you a better one though :)
you have a problem with jQuery in your website.
I think you need to update your theme.
your theme is from 6/2014 and now is 6/2016...
Your js makes all this section on home vertical align to middle. And the js doesn't work now and stay on top.
Update your theme :)

CSS/Javascript - Div removing itself from Page

I'm currently putting together a website for a buddy and myself. I purchased a template (mind all the silly placeholders and obvious space issues) to help get the ball rolling as I didn't have very much time available to put in to the project.
On the store section of the page you have that little gallery of products, when you scroll down a bit more it removes itself from the page (page jitters, clicking from store to about works funny). This is causing an issue with my Jquery waypoints setup. I can't for the life of me figure out what's removing it from the page when I'd like to keep it there at all times.
Any help is appreciated.
http://lovedrugfrontend.herokuapp.com/
For quick fix you can try to give the
style = "display:block!important";
to the 'team' class.
This will solve your issue.
This is just quick fix. Cant fix the issue without js files.

Page flickers on load - hide/show javascript - Total Newbie

Ok so here goes.. I'm totally new to Javascript. I only started on html&css about a month ago. All my htl and css is probably pretty backward and i've got a stack to learn. I'm using two pieces of javascript - one piece loads the nivo slider and the other the hide and show easy tabs:
http://www.kollermedia.at/archive/2007/07/04/easy-tabs-11-free-tab-menu/
Both were fine when I hacked them to hell trying to get them to look the way I wanted. Since i've put them together all hell has broken loose (bit of an exageration) but it may as well have because although they are both working, the page flickers badly on load. I have been researching this and I hear it's called DOM flicker. I know it's due to the hidden divs showing before the script kicks in. I also notice that the increased page height, for the split second (sometimes longer) it takes the content to hide activates the scroll bars and i know this could have an affect. I'm also using background images within the links on mouse over commands.... i didn't know what else to do.
I've read you can add script to only show the content once the script has loaded but I know zero javascript : ) ... yet!
Can somebody please help me fix this? I've read lots of posts around the net but they all put the code with gaps where your supposed to fill in and where it's put is expected to be known. I'm sorry to be such a mong but could someone literally copy and paste my javascript and edit that to show me?
I know it's a lot too ask but i've been trying to fix this all day.
Here's a link showing the problem (when selecting the portfolio links the delay / flicker lasts ages!)
link to the site: http://www.adam-ashton.co.uk/homepage.html
(sorry to be so long winded)
Thanks,
David
Page Flicker can be handled with the help of some css
.hideME {
visibility:hidden;
}
Add this class to the Top Most Element (Mostly a div ) of you html page
And inside the script tag ,
write a window.load function
$(window).load(function() {
$(selector).removeClass('hideMe');
});
this should do the magic :)
Add this one line code at 46th line .. Means first line of window.load
$('.container').removeClass('hideMe');

javascript Accordion Customisation

I am using a Javascript accordion function which I found on the internet, however my Javascript skills are at a novice level ( Hence why I sourced a completed version to begin with).
What I have noticed is that when you load the page the accordion shows half initiated ( See Jsfiddle), what I would like to happen is that the accordion appears completely closed when the page is loaded.
I have put the accordion up on jsfiddle http://jsfiddle.net/richlewis14/uPvwL/, unfortunately the level of javascript used is beyond my capabilities and would appreciate any help in modifying it to my requirements, also if anyone could explain what is actually happening in the code I would appreciate that also, I would like to learn rather than jsut get the answer
Thanks
The script takes an argument to specify which element to open by default.
Change parentAccordion.init("acc","h3",0,0); to parentAccordion.init("acc","h3",0); and you're good to go :)
See http://jsfiddle.net/uPvwL/2/ for a working example.

How my select list become uneditable?

I am coding some sort of booking system - calendar. One of the features is also a (js) pop up window with detailed information about event - user can either view them or edit.
Now my problem - I have put there a HTML select control (dropdown box), quite simple - 5 options. But somehow, and I have no ide why, this select is uneditable - that means that after I click on it nothing happens (I do not get the list of the options).
I know that now I should put a code here, however, whole system is so complex that it would take me ages.
I do not await exact answer or solution of my problem. I would like to ask you for advice - what would you check? I went through CSS up and down - no clue at all. Maybe some javascript? But how? I do use one public js library, so it might be something there, I checked as well, no clue.
Any advice would be much appreciated. I am stuck now... :-(
Thanks a lot!
Peter
::EDIT::
I have found out what is was! The ID if that pop-up window is bbit-cal-buddle and there is this line in the .js:
$("#bbit-cal-buddle").mousedown(function(e) { return false });
which basically explains why I can't select anything in dropdown (funny thing - checkboxes and radio works!). So my question is: how do I exclude my select and option tag from that .js command?
I've found a useful option when the bug is that obscure is to logarithmically comment your code.
That is,
Comment 100% of the code that might be causing a problem.
Test
If it works, uncomment 50% of the code you commented and go to step #2.
If it doesn't work, you know the problem exists in the code you uncommented.
Yes, this is somewhat of a monolothic technique, but I've found it to be very useful in the past.
Regards,
-Doug
Just to be sure, turn off ALL styles. this will render your page without the styles(obviously) and check if you can click the drop down. If you can, it is 98% a CSS error. It happened to me awhile ago - most probably an absolutely positioned div is covering it.
If you still can't click it, bring back the CSS then disable all javascripts. It should still be clickable by then since and html select tag doesnt need JS to be clickable.
If it still doesn't work, try doing a regular html select tag and check if you can select that one. If you can, then there is something wrong with your select tag

Categories