[Solved] Get link’s text in javascript

$(“.myid”).click(function (event) { // I want to prevent the elements default action (thanks @ Rajaprabhu Aravindasamy). event.preventDefault(); alert($(this).text()); }); JSFIDDLE. Read more about preventDefault here. 1 solved Get link’s text in javascript

[Solved] my website is a disaster on IE 9 and less [closed]

It looks like you need a doctype http://validator.w3.org/check?uri=http%3A%2F%2Fdev.ux-pm.com%2F&charset=%28detect+automatically%29&doctype=Inline&group=0 This will probably clear up quite a few issues with things looking wrong on older versions of IE but this won’t necessarily fix everything. Validating is not a cure all but I do find that the more compliant the code is then the less likely bugs occur. … Read more

[Solved] how to stabilize button in div when condensing a page

You are missing the important responsive meta tag: <meta name=”viewport” content=”width=device-width, initial-scale=1″> But you are using Bootstrap, which is a responsive framework. So, the answer to your question is to study and understand Bootstrap, along with more general studying of what it means for a site to be responsive. solved how to stabilize button in … Read more

[Solved] I was wondering if a JavaScript programmer could help me write a javascript function to extract the x-y points from a JSON string [closed]

You need to use JSON.parse(); it transforms your string into an array. var jsonStr=”[{“y”: 0.0, “x”: 0.0}, {“y”: 5.0, “x”: 5.0}]”; var array=JSON.parse(jsonStr); console.log(array[0].x,array[1].x); array contains everything you need. array[0] is the first set of values. array[0].x is the first x value. DEMO http://jsfiddle.net/uXr5g/1/ 1 solved I was wondering if a JavaScript programmer could help … Read more

[Solved] Using jQuery to validate checkboxes and input text values

This might get you started. You can make the field validation as complex or simple as you wish. $(‘input[type=checkbox]’).click(function(){ var tmp = $(this).next(‘input’).val(); //validate tmp, for example: if (tmp.length > 1){ //alert(‘Text field has a value’); $(‘#mybutt’).prop(‘disabled’,false); }else{ //alert(‘Please provide a long value in text field’); $(‘#mybutt’).prop(‘disabled’, true); $(this).prop(‘checked’,false); } }); <script src=”https://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js”></script> <input id=”mybutt” … Read more

[Solved] I need to fadein fadeout 3 divs [closed]

I would add a common class to all divs and wrap them in a div. Try: var len = $(“#container”).find(“.section”).length; setInterval(function(){ var current = $(“.section:visible”); var active = $(current).index(); var next; if(active == len-1){ next = 0; } else{ next = active+1; } $(current).hide(); $(“#container .section:eq(“+next+”)”).fadeIn(); },1000); DEMO here. 4 solved I need to fadein … Read more

[Solved] How can I download pictures from a URL to a local computer without asking permission?

You can use the download attribute to force download and JS to automatically click that link. document.getElementById(‘download’).click() <a href=”https://scontent.cdninstagram.com/t51.2885-15/s640x640/sh0.08/e35/23279358_143343893084349_1681002671546302464_n.jpg” download id=”download”>Download begins</a> 3 solved How can I download pictures from a URL to a local computer without asking permission?