Angular JS ng-click content not showing on live site [closed] - javascript

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 7 years ago.
Improve this question
I have products displayed using this code:
<a ng-click="setSelection(product);" class="btn btn-sm">Full details</a>
http://plnkr.co/edit/zhsY6TAjONewyInGiwUC?p=preview
Everything works fine locally on various browsers, but now I have uploaded the content to the website, nothing is displaying when I click on 'full details'.
http://gammafightwear.co.uk/gamma-website/products-long-sleeved.html
Can anyone shed any light on why this might be?
Many thanks

I get a 404 when I click on that button.
GET http://gammafightwear.co.uk/gamma-website/includes/products/ESSCOT.html 404 (Not Found)

Related

Tampermonkey to run on YouTube load and inject code [closed]

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 2 years ago.
Improve this question
I'm trying to inject code into YouTube that fixes a bug in Magic Actions for YouTube. I have the following code from Magic Actions for Youtube that fixes the placement of Action bar that comes under the video but after update to YouTube it shows up at the top.
javascript:(function(){var b=document.querySelector('#watch7-content span'),a=document.querySelector('ytd-video-primary-info-renderer'),c=a&&a.firstElementChild;b&&a&&c&&a.insertBefore(b,c)})();
The above code is used as a bookmark but I want to use Tampermonkey to insert and run this code anytime the YouTube video plays.
window.onload = function() {
var b=document.querySelector('#watch7-content span'),a=document.querySelector('ytd-video-primary-info-renderer'),c=a&&a.firstElementChild;b&&a&&c&&a.insertBefore(b,c);
};

Strange chrome or jquery behaviour on adding a class to element [closed]

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 5 years ago.
Improve this question
When I open elements tab in Chrome (Version 61.0.3163.100 (Official Build) (64-bit))
I see -
<img id="marked" src="marked.png" class="ltmargin">
However, when I write $("#marked")[0] in console tab
I see -
<img id="marked" src="marked.png" class="ltmargin hidenow">
Also, $("#marked").length is 1
hidenow class is supposed to hide the image (display: none) and is working fine for elements on which hidenow is added inside the html file. The image on the page is visible. In my js file, I add hidenow to #marked using jquery .addClass() but it doesn't show up in html!
Has anyone encountered this before? How should I debug this? Any help is appreciated. Thanks!
The problem was that id of #marked was actually #moremark before and was being changed in js, adding a class after it did not work. So I did this -
$("#moremarked").addClass("hidenow");
// change id after adding the class
$("#moremarked").prop("id", "marked");
and everything is working fine!

I want to remove this line from my html code [closed]

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 7 years ago.
Improve this question
This is the image of my html code.
I want to get rid of the line boxed in red.Please help me.That line does not show in the actual code, but when the page is opened on a browser i.e in (google chrome) and selected "view source code" it shows the line.I want to get rid of it.Please help me, reply me a.s.a.p..Thank you.
Definitely adware. Check out: http://www.malwarekillers.com/tag/remove-track-breaking-news/
As #Tanuel said, this is either from malware or a browser extension since it seems that you didn't put it in the source code.
Go to Dev Tools in Chrome (Ctrl+Shift+i) and look at Network and check what scripts are being loaded on the page.
Also, take your time to explore the Elements tab and to find out how that line is being added to the code.
This is a bad post but I can feel the frustration in your question and the answer is probably just this:
<script>
$(document).on('pageload',function()
{
document.getElementsByTagName('script')[0]='';
});
</script>
Add it to the bottom of your page.

Chrome and Firefox strange behavior on page scroll [closed]

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 7 years ago.
Improve this question
I developed a website at this address.
As you can see, everything seems to be fine including get files from server(200 OK) when a user visit the site, and every piece of code works correctly, including CSS and JS.
The problem is this:
The page looks good at the very first look, but the scroll is locked in Chrome and Firefox but surprisingly in IE 11 everything is fine.
I tried Firebug but couldn't find anything useful.
Could you take a look to my page and let me know what's wrong with the page?
Thanks in advance.
You are missing the most important parts of an HTML document.
You don't have opening <html> or <head> tags. This is critical, and probably a good part of the reason your site is busted.
While the tags show up in the inspector, they aren't there in the source. Chrome's inspector will add in missing opening/closing tags. Look at your source, you'll see.

Why jquery event doesn't handle? [closed]

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 8 years ago.
Improve this question
I have wrote following code example:
html:
<input type="checkbox" name="terminal" class="all" data-terminal-id="9800" >
javascript:
function checkRightBarVisibility(){
if(this.checked){
alert('checked');
}
}
$('input[name=terminal]').change(checkRightBarVisibility);
http://jsfiddle.net/o9ovnkxv/6/
This code works as expected.
But in my real code I have same javascipt code but I don't see alert.
I have not ideas how can it possible.
debug information:
bigger picture(http://i.stack.imgur.com/ADXB5.jpg)
Please help me to find the mistake.
P.S.
full code is very huge thus I didn't post it.
update:
I tried following in debug:
I wrote following row:
$('input[name=terminal]').change(checkRightBarVisibility);
After it I have seen alert 1 time.
But only one time.
If your inputs are being added dynamically then you should use delegation:
$('body').on("change", 'input[name=terminal]', checkRightBarVisibility);
(In jQuery, how to attach events to dynamic html elements?)

Categories

Resources