Skip to content

Wes MK submitting homework#7

Open
maffkipp wants to merge 1 commit intowdi-atx-12:masterfrom
maffkipp:wes_hw_branch
Open

Wes MK submitting homework#7
maffkipp wants to merge 1 commit intowdi-atx-12:masterfrom
maffkipp:wes_hw_branch

Conversation

@maffkipp
Copy link

No description provided.

Copy link

@BritneyJo BritneyJo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Really nice job!

<input type="text" class="weather-city" name="q" placeholder="Enter a city.."/>
<input type="hidden" name="appid" value="f44e9d4e81fbd380f38ccb737f016c30">
<input type="submit" value="Get Weather" class="submit-button">
<p class="city-error" style="display:none;">Whoops! Looks like that city doesn't exist, try another one.</p>

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of setting this as an inline style, simply add a "hidden" class and then toggle the class instead of the style with js when you need it to show.


function onSuccess(returnData) {

$('.city-error').css('display', 'none');

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This would be where you toggle the class instead of adjusting the CSS.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants