|
Is the demo I posted not working?
Which browser are you using?
Are there any errors in the browser's error console?
Is there anything odd about the CSS styles applied to the div?
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
the demo you show is working..i am using Chrome..i do not know how to see the errors in the console...
the image is inside a group of elements frame and i am animating the images with this code:
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<style>
#WE21c6b55f75:hover {
animation: shake 0.6s;
}
@keyframes shake {
100% { transform: translate(0px, 0px) rotate(360deg); }
}
</style>
</head>
<body>
</body>
</html>
and the group of elements with this one:
<script>
$(document).ready(function(){
$("div").mouseenter(function(){
$("#WEdeade99e88").animate({
top:"20px"
});
$("#WE427d1fab8f").animate({
top: "5px"
});
$("#WEcee0bb0ded").animate({
top: "210px"
});
$("#WEa1d10f7aea").animate({
top: "200px"
});
$("#WEd710230262").animate({
top: "200px"
});
});
});
</script>
modified 7-Jan-19 21:02pm.
|
|
|
|
|
On Windows, F12 will open the developer console in most browsers.
Try removing the animation code, in case that's moving the target so that you can't click on it. Also, check whether there's another element sitting in front of the target, or any event handlers on the child elements which might prevent a click event from bubbling.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
nop..i cannot see anything that would prevent this to work :s
back to the first code i showed you:
<button onclick="scrollWin()">Click me to scroll horizontally!</button><br><br>
<script>
function scrollWin() {
window.scrollTo(500, 0);
}
</script>
was working but from an html button..is there a way to replace the button element by my image: "WE21c6b55f75" ........?
modified 7-Jan-19 21:02pm.
|
|
|
|
|
There's no secret code that I'm not telling you; what I've shown you so far is how it's done.
If it's not working, then you need to debug it. I can't do that for you, because I don't have access to your page.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
well ..is there a way to replace the button element by my image?...if yes i would have my problem solved man!!
modified 7-Jan-19 21:02pm.
|
|
|
|
|
Edit fiddle - JSFiddle[^]
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
ok..i have set all this in the same code containner and it is working now:
<div id="WE21c6b55f75" onclick="scrollWin()" class="BaseDiv RKeepRatio OEWEImage OESK_WEImage_Default" style="z-index:1002">
<div class="OESZ OESZ_DivContent OESZG_WE21c6b55f75">
<img src="WEFiles/Image/WEImage/scroll-WE21c6b55f75.png" class="OESZ OESZ_Img OESZG_WE21c6b55f75" alt="" />
</div>
</div>
<script>
function scrollWin() {
window.scrollTo(0, 3000);
}
</script>
Thanks for your consideration!!
modified 7-Jan-19 21:02pm.
|
|
|
|
|
i just tried with other elements in the page and it is not working..i also tried to upload the thing to see if it worked in an uploaded project...but nothing
modified 7-Jan-19 21:02pm.
|
|
|
|
|
i am running this site: beatassist.eu :and i am using OpenElement software..which i find an awesome software..if you check the site you will say: "you can do all this and you cannot make a button to scroll from an image?" ... the problem is that YES i am not figuring it out?!!
Thank You!
modified 7-Jan-19 21:02pm.
|
|
|
|
|
How are websites that use database being developed today? For example, is using JAVA JSP and MYSQL a good approach? What are the most popular programming languages that are being used today for web dev? I am familiar with Java and C#. If JAVA is used then what is used along w/ java (besides HTML, CSS, and Javascript). I want to learn more about it and want to know what direction I should focus my attention.
Thank you,
Steven
|
|
|
|
|
Most are doing it the wrong way; why do you ask?
|
|
|
|
|
I want to learn more about web dev. I like working with Java. I have built some small websites that access DB. What to learn more. Is JAVA still a good approach?
|
|
|
|
|
There is no single "right way". It mostly depends on the hosting platform, and what the project's requirements are.
The common components between all web sites are javascript, css, and HTML5. If you are fluent in those three things, you're good, because whatever else you need to know can be learned.
You can essentially use anything anywhere, so it's mostly all about what YOU are comfortable with.
".45 ACP - because shooting twice is just silly" - JSOP, 2010 ----- You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010 ----- When you pry the gun from my cold dead hands, be careful - the barrel will be very hot. - JSOP, 2013
modified 29-Jan-18 21:19pm.
|
|
|
|
|
I'm trying to use the @font-face rule in CSS so that the typefaces I choose appear consistently no matter what fonts a user has available on their device. However, the fonts are not appearing even on my system. So, I wanted to make sure I'm formatting the code correctly (as I'm definitely no expert on this).
Here's some of the code from the site I'm building. Please let me know what should be done to display the fonts as intended.
@charset "UTF-8";
@font-face {
font-family: MrsEaves-Roman;
src: url("/fonts/MrsEavRom.lwfn") format("lwfn");
font-stretch: normal;
font-style: normal;
font-weight: normal;
}
@font-face {
font-family: Priori-Sans-Regular;
src: url("/fonts/PriorSanReg.ttf") format("ttf");
font-stretch: normal;
font-style: normal;
font-weight: normal;
}
@font-face {
font-family: Chalet-London;
src: url("/fonts/Chalet-LondonNineteenEighty.otf") format("otf");
font-stretch: normal;
font-style: normal;
font-weight: normal;
}
.at-hero-head {
font-family: "MrsEaves-Roman";
font-size: 32px;
text-align: left;
color: ffffff;
}
.at-hero-head-chalet {
font-family: "Chalet-London";
font-size: 32px;
text-align: left;
color: ffffff;
}
|
|
|
|
|
Maybe you just miss the quotes on the font-family, like at bottom "MrsEaves-Roman".
I dont use font-face so i dont know exactly if you need something other... verify the url path too.
"Appear consistently", not exactly, depending of the font file type and what the browser accept.
So you have to load 3-4 "identical" fonts files type to be "cross browser" with the same font.
modified 29-Jan-18 8:03am.
|
|
|
|
|
Has anyone else observed the abysmal upload speed of the File Upload functionality in MVC5?
It takes a couple of minutes to upload a 25mb file, but only a second or two to download the same file.
".45 ACP - because shooting twice is just silly" - JSOP, 2010 ----- You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010 ----- When you pry the gun from my cold dead hands, be careful - the barrel will be very hot. - JSOP, 2013
|
|
|
|
|
|
0) It's not the router
1) This question is a year and a half old.
".45 ACP - because shooting twice is just silly" - JSOP, 2010 ----- You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010 ----- When you pry the gun from my cold dead hands, be careful - the barrel will be very hot. - JSOP, 2013
|
|
|
|
|
How can I put a database into a html page.plz forgive me if I ask some wrong question as I am a beginner BCA 1ST SEMESTER.
PLS GUIDE ME
|
|
|
|
|
|
I'm currently working on a project that uses the very same concept. So first thing: you need more than just HTML, but let's start with databases. You can start by using MySQL. Then you're going to need PHP to handle that data i.e. taking it from your database onto your webpage. This is where learning JSON, and by extension JavaScript, is going to actually make this work. Next up on your front end, your webpage, you'll need to use JavaScript with your HTML to get that database on the screen.
Also, what's BCA?
I did have some programming knowledge before doing this and some basic grasp of HTML and JavaScript before embarking on this sort of thing.
Oh one thing that you may find useful, before your website goes live, is XAMPP. It is a local server and has MySQL rolled into one platform. I found it very useful. IT's a great way of testing out your new website without having to spend anything just yet. Although with XAMPP it's still not live, it's good the testing stage.
Please excuse the excessive amounts of info. Welcome to the world of coding.
|
|
|
|
|
This message was not meant for me.
|
|
|
|
|
I'm trying to get some JavaScript to unpack some data using a JSON parse from a separate bit of PHP. Here's what that JSON parse looks like:
[{"ID":"0","Item":"A","Price":"100","Stock":"2214"}, {"ID":"1","Item":"B","Price":"100","Stock":"2214"}....to whatever]
Here's the Javascript that handles all of that:
txt += products[i].ID + ": " + products[i].Item + " \n" + "Price: " + products[i].Price + " \nStock availability: " + products[i].Stock + " \n\n";
$("#itemSelection").append($("<option></option>").text(products[i].Item +"" + products[i].Price).val( products[i].Price ));
This is actually the body of a for loop. So that 1st line unravels the string of data from before and the next line then displays that on a HTML dropdown box. Of course it displays the item and the price, but the actual value of the selection in the background is just the price. Is there a way that the value of the selection can be both the name of the item and the price? Moreover, is there a more efficient way of doing this, since my method for getting the selected item from the drop box into a form is the next bit.
So as part of the aforementioned for loop, this just take that info and sticks it into an array:
sqlStockArr.push( new sqlStock(products[i].Item, products[i].Price) );
Everytime a user makes a selection, this next bit takes the text, value and position of the selection:
var a = $( "#itemSelection option:selected" ).text();
var b = $( "#itemSelection option:selected" ).val();
var c = $("#itemSelection option:selected").index();
var selArrItem = sqlStockArr[ c ].item;
var selArrPrice = sqlStockArr[ c ].price;
$( document ).ready( function(){
$("#customerSelection").append($("<option></option>").text(a).val(b));
selectedArr.push( new sqlStock(selArrItem, selArrPrice) );
total += sqlStockArr[ c ].price;
$("#printPrice").text(total);
Pretty sure I've just made a mess of this. Also please note that I've only included the main chunks of code. If it was part of a function or something, that's not really the issue. Anyways, what you can see is once something has been selected from the aforementioned itemSelection and put into the customerSelection using .text(a).val(b), it does the same kind of thing as before. Another array is made to handle all of that data. Again, is there a less messy way of doing things.
Real sorry if this is just a confusing pile of mess. If anyone can offer up some constructive critique, please go right ahead.
|
|
|
|
|
Valecia_cho wrote: Is there a way that the value of the selection can be both the name of the item and the price?
There sure is, and it'll save you a lot of pain down the road as well:
...
for(var i=0;i<products.length;i++){
$("#itemSelection").append($("<option></option>").text(products[i].Item +"" + products[i].Price).val(i));
}
Then your detail selection becomes:
var idx = $( "#itemSelection option:selected" ).val();
var selected = products[idx];
In short, don't recreate objects that you already have available. Use the same collection, it has all the data that you need and much easier to just use it than trying to update a subordinate collection. Make your presentation dance to the tune of your models, not the other way around.
"There are three kinds of lies: lies, damned lies and statistics."
- Benjamin Disraeli
|
|
|
|